Skip to main content
Adventure

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.

POST
/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/travels/end
curl --location 'https://dashscope-intl.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"
}'
{
  "code": 0,
  "message": null,
  "data": {
    "encryptedTravelId": "trvl_a1b2****",
    "status": "completed",
    "errorCode": null,
    "errorMessage": null,
    "endedAt": "2026-06-04T00:03:00Z",
    "durationSec": 90
  }
}

Scope

Actively end an Adventure Travel. Before calling, confirm the following:
  • The primary API Key is not required; either the primary or a temporary API Key can call it.
  • 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.
  • Either your server or your client can call it.
If the model call fails and returns an error, see HappyOyster Error Codes.

Authorizations

string
header
required

QwenCloud API Key. Only the primary API Key (sk- prefix) is supported. See Get an API Key.

Header Parameters

string
default"application/json"
required

Request content type. This parameter must be set to application/json.

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.

Body

application/json
string
required

The Adventure encrypted Travel ID to end. Returned by Enter Travel (Client).

enum<string>

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.

TRAVEL_NO_STREAM_AUTO_END
string

SDK or client version identifier. A non-empty string; takes precedence over the HTTP User-Agent.

Response

200-application/json
integer

Return code. 0 means success; non-zero is an error code.

string

Error message. null on success.

object

Response data. null on failure.

HappyOyster-Adventure-End Travel API Reference - QwenCloud