SubmitTextGenerateJob

Updated at:

Expands marketing copy based on the submitted keywords, word count, and number of copies. Due to the characteristics of the Chinese language, the word count of the generated copy may differ from the requested word count. After you submit the task, call the GetSmartHandleJob operation by using the job ID to query the task status and results.

Operation description

  • Before you call this operation, you must purchase the Enterprise Subscription Service to obtain the permissions to use this feature. For more information, see Subscription billing.

  • This operation is billed based on the number of tokens in the generated content. The number of tokens is positively correlated with the word count of the generated text. For more information, see Intelligent one-click video generation. If the synthesis task fails, no fees are incurred.

  • This operation is an asynchronous operation. After you submit a task, a task ID is returned. The task is not completed at this time and is queued for asynchronous execution in the background. The final result is notified through a callback. You can also call the Obtain intelligent task results operation to actively query the task status.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:SubmitTextGenerateJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Title

string

No

The title of the task.

  • The length cannot exceed 128 bytes.

  • The title must be encoded in UTF-8.

Test Title

Description

string

No

The description of the task. The description can be up to 1,024 bytes in length and must be encoded in UTF-8.

Test Description

Type

string

No

The type of the task. Valid values:

  • MarketingCopy: marketing copy

  • Title: short video title

  • StoryboardScript: storyboard script generated from copy

Valid values:

  • MarketingCopy :

    Marketing copy.

  • Title :

    Short video title.

MarketingCopy

GenerateConfig

string

No

The generation configuration. When Type is set to Title or MarketingCopy, you must specify the following fields:

  • keywords: the keywords used to generate the title or marketing copy. Required.

  • textLength: the word count of the generated copy. Valid values: 5 to 1000. The actual word count of the generated copy may be slightly less than or equal to this value, but will not exceed it. Required.

  • targetCount: the number of copies to generate. Valid values: 1 to 1000. Required.

When Type is set to StoryboardScript, you must specify the following field:

  • originText: the original copy used to generate the storyboard script. Required.

{"keywords":"New store cake,Animal cream","textLength":100,"targetCount":3} or {"originText": "A new cake shop has opened on the street,Selling cream cakes,Fruit cake,Bread,Muffins, etc..A coffee shop has opened across from the cake shop,An endless stream of customers."}

UserData

string

No

The custom settings in JSON format. The length cannot exceed 512 bytes. Custom callback URL configuration is supported.

{"NotifyAddress":"http://xx.xx.xxx"}

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

******11-DB8D-4A9A-875B-275798******

JobId

string

The ID of the intelligent task.

****d80e4e4044975745c14b****

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "JobId": "****d80e4e4044975745c14b****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.