Actively end an Adventure Travel. After a normal end it enters completed; on a no-stream timeout end it enters failed and no replay artifacts are generated. The server also ends it automatically when maxExperienceTimeSec is reached.
Scope
Actively end an Adventure Travel. After a normal end the Travel enters completed; on a no-stream timeout end it enters failed. 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 must not yet have entered a terminal state and must be in a state the server can end. 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-adventure/openapi/v1/travels/end
Replace {WorkspaceId} with your actual Workspace ID.
China (Beijing)
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/end
Replace {WorkspaceId} with your actual Workspace ID.
US (Virginia)
POST https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/end
Replace {WorkspaceId} with your actual Workspace ID.
Request parameters | Normal endNo-stream timeout end |
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 Adventure encrypted Travel ID to end. Returned by Enter Travel. | |
failCode The failure end reason for a no-stream timeout. When omitted, it is treated as a normal end. Currently only supported:
Passing an unsupported value returns | |
userAgent SDK or client version identifier. A non-empty string; takes precedence over the HTTP |
Response parameters | Normal endNo-stream timeout end |
code Return code. | |
message Error message. | |
data Response data. |
Prerequisite states and call notes
- The
encryptedTravelIdmust belong to the current primary account and the Adventure model. - When
failCodeis omitted, it is treated as a normal end; passing an unsupported value returns400000. - The server automatically ends the Travel once
maxExperienceTimeSecis reached; the client should converge its local state from status callbacks or status query results. - On a normal end,
durationSecpreferentially uses the actual duration of the available finished video; it may benullwhen the finished-video duration cannot yet be parsed. - After a normal end reaches
completed, the composited artifacts may still be processing; query and poll them per Query Travel Artifacts.
Error codes
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.
Next steps
After the Travel enters completed:
- Query Travel Artifacts: poll to obtain the recorded original and composited variants.
- Query Travel List: view historical Travels.