Send a single text instruction to a standard-mode Travel to drive subsequent frame generation. Only creationModel=simple is supported; a scriptlist Travel should use full script update.
Scope
Send a single text instruction to a standard-mode (creationModel=simple) Travel to drive subsequent frame generation. Before calling, confirm the following:
- Authentication: The primary API Key is not required; either the primary or a temporary API Key can call it. For how to obtain them, see Obtain authentication credentials.
- Prerequisites: The Travel's
creationModelmust besimple, and it must be in a state that can receive instructions. Confirm via Query Travel Status. - Caller: Either your server or your client can call it.
HTTP request
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-directing/openapi/v1/travels/instruct
Replace {WorkspaceId} with your actual Workspace ID.
US (Virginia)
POST https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-directing/openapi/v1/travels/instruct
Replace {WorkspaceId} with your actual Workspace ID.
Request parameters | Send process instruction |
Content-Type Request content type. This parameter must be set to | |
Authorization API Key authentication. The primary API Key is not required; either the primary or a temporary API Key can call it.
| |
Request Body | |
encryptedTravelId The Directing encrypted Travel ID to control; | |
content The text process instruction. Non-empty, up to 2000 characters; returns | |
clientRequestId Idempotency key for instruction retries. Reuse the same value when retrying the same instruction to avoid duplicate billing. Recommended format
| |
userAgent SDK or client version identifier. A non-empty string; takes precedence over the HTTP |
Response parameters | Instruction accepted |
code Return code. | |
message Error message. | |
data Response data. |
Prerequisite states and call notes
- Only
creationModel=simplesupports this endpoint; ascriptlistTravel should use Full Script Update, and callinginstructby mistake returns403006. - The Travel's current state must be able to receive instructions; a Travel that has ended or failed is not writable.
- When
contentis empty or over 2000 characters,400000is returned. - We recommend generating a stable
clientRequestIdfor each logical instruction and reusing it on retries. - When the instruction fails the content safety policy,
403004is returned.
Error codes
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.
Next steps
After sending the instruction:
- Query Travel Status: view instruction execution status and chapter information.
- Pause Travel / Resume Travel / Rewind Travel.
- End Travel: end the session and process artifacts.