End a Directing Travel. After a normal end the status changes to completed and it enters artifact processing; on a no-stream timeout end it changes to failed and no replay artifacts are generated.
Scope
End a Directing Travel. After a normal end the status changes to completed and it enters artifact processing; on a no-stream timeout end it changes to failed and no replay artifacts are generated. 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-directing/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-directing/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 Directing encrypted Travel ID to end. Returned by Enter Travel. | |
failCode The failure end reason. 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 client should poll Query Travel Status after entering the room. If
rtcStatushas not entered the streaming state withinnoStreamAutoEndTimeoutSec, end it withTRAVEL_NO_STREAM_AUTO_END. - After passing
TRAVEL_NO_STREAM_AUTO_END, the Travel becomesfailedand no replay artifacts can be queried. - On a normal end,
durationSecpreferentially uses the final video file duration; when the final video is not yet available, it uses thedurationMsof the latest currently available generation result. When neither is available, it isnull. - After a normal end reaches
completed, artifact composition may still be in progress; decide whether to keep polling based on the returned status of 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.