Skip to main content
Adventure Open API Reference

HappyOyster-Adventure-End Travel API Reference

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
  • China (Beijing)
  • US (Virginia)
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/endReplace {WorkspaceId} with your actual Workspace ID.

Request parameters

  • Normal end
  • No-stream timeout end
curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/end' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "encryptedTravelId": "{encryptedTravelId}",
    "userAgent": "HappyOyster-Web/0.1.0"
}'
Content-Typestring(Required)Request content type. This parameter must be set to application/json.
Authorization string (Required)API Key authentication. The primary API Key is not required; either the primary or a temporary API Key can call it.
  • Primary API Key: starts with sk-, e.g. sk-xxx.
  • Temporary API Key: starts with st-, e.g. st-xxx.
Request Body
encryptedTravelId string (Required)The Adventure encrypted Travel ID to end. Returned by Enter Travel.
failCode string (Optional)The failure end reason for a no-stream timeout. When omitted, it is treated as a normal end. Currently only supported:
  • TRAVEL_NO_STREAM_AUTO_END: for the scenario where no stream is received after entering the room for longer than noStreamAutoEndTimeoutSec; this end type does not generate replay artifacts
Passing an unsupported value returns 400000.
userAgent string (Optional)SDK or client version identifier. A non-empty string; takes precedence over the HTTP User-Agent.

Response parameters

  • Normal end
  • No-stream timeout end
{
    "code": 0,
    "message": null,
    "data": {
        "encryptedTravelId": "trvl_a1b2****",
        "status": "completed",
        "errorCode": null,
        "errorMessage": null,
        "endedAt": "2026-06-04T00:03:00Z",
        "durationSec": 90
    }
}
code integerReturn code. 0 means success; non-zero is an error code.
message stringError message. null on success.
data objectResponse data. null on failure.

Properties

encryptedTravelId stringThe encrypted Travel ID that was ended.status stringEnd status:
  • completed: normal end
  • failed: failure end when a supported failCode is provided
errorCode stringFailure reason code; null on a normal end.errorMessage stringFailure description; null on a normal end.endedAt stringEnd time, in ISO 8601 format.durationSec integerEffective video duration in seconds; null on a no-stream failure end or when the duration cannot yet be parsed.

Prerequisite states and call notes

  • The encryptedTravelId must belong to the current primary account and the Adventure model.
  • When failCode is omitted, it is treated as a normal end; passing an unsupported value returns 400000.
  • The server automatically ends the Travel once maxExperienceTimeSec is reached; the client should converge its local state from status callbacks or status query results.
  • On a normal end, durationSec preferentially uses the actual duration of the available finished video; it may be null when 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:
Text Generation
Image Generation
  • FAQ
Video Generation
Audio
  • Audio generation
Realtime API
Text Embedding
Decision Model
TokenPlan
Model Production