Skip to main content

RunScriptContinue

Generates script continuations for film, television, and interactive entertainment.

Operation description

This feature quickly generates the next part based on the preceding script text that users provide, expanding the continuation ideas of editors.

Debug

You can run this API directly in OpenAPI Explorer, saving you from computing signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. The details are as follows:
  • Operation: the specific permission point.
  • Access level: the access level of each operation. Valid values: Write, Read, and List.
  • Resource type: the resource types that support authorization in the operation. Details are as follows:
    • Required resource types are marked with an asterisk (*) before them.
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.
  • Related operation: other permissions required to successfully perform the operation. The caller must have the permissions of related operations at the same time for the operation to succeed.
OperationAccess levelResource typeCondition keyRelated operation
quanmiaolightapp:RunScriptContinuenone
*All resources
*
    None
None

Request syntax

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

Request parameters

NameTypeRequiredDescriptionExample value
workspaceIdstringYesllm-e9zzbkg0aj2mlXX
scriptTypeKeywordstringNo

Script type keywords: users provide qualitative descriptions for the script type, such as historical fantasy, sci-fi, romance, and Xuanhuan.

Suspense, Urban, Thriller
scriptSummarystringNo

Script summary: a brief story description that users provide for the script.

A squad of fully armed law enforcement officers and firefighters bursts into an apartment that has clearly been abandoned for days, with doors and windows shut tight and sealed with tape. Facing the nauseating stench and the chaotic scene in the hallway, they appear to be searching for some hidden truth or source of danger. A letter dated the 16th becomes the key clue to unraveling the mystery, and as the plainclothes detective explores deeper, a series of sealed rooms hints at secret events that once took place here.
userProvidedContentstringYes

Preceding text description: to continue a section of the content, users must provide the preceding text.

The hallway is a mess. The window facing the courtyard is open. The apartment door is suddenly busted open.\nA plainclothes detective, two uniformed police officers, and several firefighters, also in work gear, enter and look around. They all wear gloves and masks covering their noses and mouths. Behind them, the building superintendent and his wife squeeze into the hallway. They all cover their noses. The superintendent holds a stack of letters and promotional flyers in his other hand. Behind them follows a female neighbor.\nPlainclothes detective (to the superintendent and neighbor): Please wait outside.\nHe gestures to a police officer, who is busy ushering curious bystanders out.\nPolice officer (to the superintendent, pointing at the stack of letters): Which one is the most recent?\nSuperintendent (checking the letters): The most recent one seems to be from the 16th... wait a moment...\nThe plainclothes detective tries to open the door on the left, in vain. The door is sealed with tape.\nPlainclothes detective (to the firefighter): Can you give it a try?\nWhile the firefighter works on the door, the plainclothes detective enters the dining room next to the bedroom. He quickly opens the window, turns, and tries to go through the French doors into the room on the left. Those doors are also locked, with tape sealing the gap. He turns right into the living room and opens the window there too.

Response elements

NameTypeDescriptionExample value
object

Schema of Response

endboolean

Indicates whether the output is complete. A value of true indicates that the output is complete.

headerobject

The streaming output header, which contains general response information.

errorCodestring

The error code.

403
errorMessagestring

The error message.

Pop sign mismatch, please check.
eventstring

The event type.

result-generated
eventInfostring

The event description.

Model generation event
requestIdstring

The request ID.

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

The session ID.

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

The ID of a generation task.

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

The trace ID.

2150451a17191950923411783e2927
payloadobject

The payload of the response, in JSON structure.

outputobject

The output content object.

textstring

The output content.

This is test output
usageobject

The token usage information of the large model.

inputTokenslong

The number of input tokens.

100
outputTokenslong

The number of output tokens.

100
totalTokenslong

The 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 workspaceId.
Visit the Error Center to view more error codes.