Skip to main content

RunScriptPlanning

Scriptwriting for film, television, and interactive entertainment, including script development.

Operation description

You can input basic script requirements to generate a script synopsis and brief shot descriptions. This feature helps editors quickly create a script framework.

Try it now

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Try it

Authorization information

The following table describes the authorization information of the API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
  • Operation: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, or List.
  • Resource type: the resource types that support authorization in the operation. Details are as follows:
    • For required resource types, an asterisk (*) is prefixed.
    • For operations that do not support resource-level authorization, All Resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Dependent action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
OperationAccess levelResource typeCondition keyDependent action
quanmiaolightapp:RunScriptPlanningnone
*All Resources
*
    None
None

Request syntax

POST /{workspaceId}/quanmiao/lightapp/runScriptPlanning HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYes

Unique identifier of an Alibaba Cloud Model Studio workspace. For more information, see workspace ID.

llm-e9zzbkg0aj2mlXX
scriptNamestringNo

Script name entered in natural language.

Urban War God
scriptTypeKeywordstringNo

Script type keyword: users can provide a qualitative description of the script type, such as alternate history, sci-fi, romance, or fantasy.

Modern, Urban, Romance, Fantasy
scriptSummarystringYes

Script synopsis: a brief story description that the user provides for the script.

In a quiet little town, every household receives a mysterious, unmarked package on the same day.
scriptShotCountintegerNo

Number of script shots: users can define the number of shot descriptions to generate within a single script. Value range: 1 to 10.

3
dialogueInScenebooleanNo

Whether specific shot dialogues are needed. Default value: false.

plotConflictbooleanNo

Readability: users can choose whether to add plot conflicts and twist elements to the planning content. If selected, they are automatically generated in the plot.

additionalNotestringNo

Additional notes: users can make open-ended adjustments by entering natural language descriptions in the text box, such as adding descriptions of tense and thrilling moments, to fine-tune the output.

Make the story as melodramatic as possible

Response parameters

NameTypeDescriptionExample value
object

Schema of Response

endboolean

Whether the output is complete. true indicates completion.

headerobject

Streaming output header, containing general return information.

errorCodestring

Abnormal error code.

403
errorMessagestring

Abnormal error message.

Pop sign mismatch, please check.
eventstring

Event type.

result-generated
eventInfostring

Event description.

Model generation event
requestIdstring

Request ID.

0EB27AE3-CA53-5FAE-83C6-EE66CA4DF5DF
sessionIdstring

Session ID.

3cd10828-0e42-471c-8f1a-931cde20b035
taskIdstring

Generation task ID.

d3be9981-ca2d-4e17-bf31-1c0a628e9f99
traceIdstring

Trace ID.

2150451a17191950923411783e2927
payloadobject

Payload of the returned result, in JSON structure.

outputobject

Output content object.

textstring

Output content.

This is test output
usageobject

LLM token usage information.

inputTokenslong

Number of input tokens.

100
outputTokenslong

Number of output tokens.

100
totalTokenslong

Total number of tokens.

200

Examples

Success response JSON format
{
  "end": true,
  "header": {
    "errorCode": 403,
    "errorMessage": "Pop sign mismatch, please check.",
    "event": "result-generated",
    "eventInfo": "模型生成事件",
    "requestId": "0EB27AE3-CA53-5FAE-83C6-EE66CA4DF5DF",
    "sessionId": "3cd10828-0e42-471c-8f1a-931cde20b035",
    "taskId": "d3be9981-ca2d-4e17-bf31-1c0a628e9f99",
    "traceId": "2150451a17191950923411783e2927"
  },
  "payload": {
    "output": {
      "text": "这是测试输出"
    },
    "usage": {
      "inputTokens": 100,
      "outputTokens": 100,
      "totalTokens": 200
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action , Please check the assignment of the workspaceId.Check the assignment of the workspaceId.
See Error Center for more error codes.