All Products
Search
Document Center

Alibaba Cloud Model Studio:HappyOyster-Directing-Rewind Travel API Reference

Last Updated:Sep 20, 2026

Rewind a Travel to a specified video timestamp and resume running from the actual landing point. The Travel must first enter the paused state.

Scope

Rewind a Travel to a specified video timestamp and resume running from the actual landing point. 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 first enter the paused state; it cannot be rewound directly while running. 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/rewind

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/rewind

Replace {WorkspaceId} with your actual Workspace ID.

Request parameters

Rewind Travel

curl --location 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-directing/openapi/v1/travels/rewind' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "encryptedTravelId": "{encryptedTravelId}",
    "rewindToSec": 84.0,
    "userAgent": "your-client/1.2.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 Directing encrypted Travel ID to rewind. Returned by Enter Travel.

rewindToSec number (Required)

The target video time, in seconds. Greater than or equal to 0; a multiple of 4 is recommended (such as 4, 8, 12). The server rounds it to the nearest 4-second boundary using Math.round(rewindToSec / 4) × 4. The actual landing point is determined by resumedAtSec / actualRewindToSec in the response.

userAgent string (Optional)

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

Response parameters

Rewind succeeded

{
    "code": 0,
    "message": null,
    "data": {
        "encryptedTravelId": "trvl_a1b2****",
        "status": "running",
        "resumedAtSec": 84.0,
        "actualRewindToSec": 84.0
    }
}

code integer

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

message string

Error message. null on success.

data object

Response data. null on failure.

Properties

encryptedTravelId string

The encrypted Travel ID.

status string

The status after the rewind completes; returns running.

resumedAtSec number

The actual number of seconds at which playback resumes; it may deviate slightly from the requested value.

actualRewindToSec number

The actual rewind landing point; identical to resumedAtSec.

Prerequisite states and call notes

  • The Travel must first enter paused; it cannot be rewound directly while running.
  • Pause Travel has an asynchronous confirmation barrier of about 3 seconds. After receiving the pause response, you should still poll Query Travel Status and confirm the externally visible status is already paused before calling this endpoint.
  • The script is organized in 4-second Blocks; a multiple of 4 such as 4, 8, or 12 is recommended for rewindToSec (for example, 6 → 8).
  • The actual landing point is determined by resumedAtSec / actualRewindToSec.

Error codes

If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.

Next steps

After the rewind, the Travel returns to running: