Create a role-play World. Create a World from a natural-language prompt and a required first-frame image; the API immediately returns an encrypted World ID (encryptedWorldId), the World builds asynchronously in the background, and the client polls the build progress until it completes.
Scope
Create an Acting World. Before calling, confirm the following:
-
Authentication: Only the primary API Key is supported; temporary API Keys cannot be used (error code
403003).- Get the primary API Key: Get and configure an API Key.
-
Call mode: Asynchronous mode is recommended.
- Asynchronous mode (default):
async=true, the API immediately returnsencryptedWorldId; poll Query World Build Status for progress. - Synchronous mode:
async=false, the server polls internally (every 3s, up to 120s) and returns when the build completes; on timeout it falls back to asynchronous and the client keeps polling.
- Asynchronous mode (default):
-
Endpoint restrictions: This endpoint can only create an Acting World. You do not need to pass
mode(the server writes3; passing a value other than3returns400000).creationModelis alwayssimple,uploadModeis fixed tofirst_frame, and the enter-room version is fixed toactingV2.
HTTP request
- Singapore
- US (Virginia)
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v2/apps/happyoyster-1.0-acting/openapi/v1/worldsReplace {WorkspaceId} with your actual Workspace ID.Request parameters |
|
Content-Typestring(Required)Request content type. This parameter must be set to application/json. | |
Authorization string (Required)API Key authentication. Only the primary API Key is supported; it starts with sk-, e.g. sk-xxx. It is typically configured as the environment variable $DASHSCOPE_API_KEY. A temporary API Key (starting with st-) returns 403003. | |
Request Body | |
async boolean (Optional)Whether to create asynchronously. Defaults to true:
| |
creationModel string (Optional)Creation sub-mode. Defaults to simple; Acting supports only simple. | |
prompt string (Required)A natural-language description of the character, scene, and performance goal. Non-empty, up to 2000 characters. Missing, blank, or over-length returns 400000. | |
uploadMode string (Optional)Image upload mode. Defaults to first_frame; Acting supports only first_frame. | |
resolution string (Optional)Video resolution. Defaults to 480p. Allowed values:
| |
aspectRatio string (Optional)Streaming frame ratio, which also determines the first-frame image orientation; keeping the two consistent is recommended. Defaults to 9:16. Allowed values:
9:16) pass a portrait first frame, and for landscape streaming (16:9) pass a landscape first frame. Defaults to 9:16; when landscape is needed, you must explicitly pass aspectRatio=16:9. | |
refWorldId string (Optional)Derive a new creation from an existing Acting World. Must be an Acting encrypted World ID under the current primary account; a World from another model or another primary account returns 403001. | |
firstFrameImage object (Required)An image reference reused as the World's first frame. url and base64 are mutually exclusive (choose one). Image constraints:
Properties url string (Conditionally required)First-frame image URL. Mutually exclusive with base64 (choose one). Constraints:
string (Conditionally required)First-frame image base64. Mutually exclusive with url (choose one). Constraints:
string (Optional)First-frame reference type. Defaults to default, and is currently used as default. |
Response parameters |
|
code integerReturn code. 0 means success; non-zero is an error code. | |
message stringError message. null on success; a human-readable error message on failure. | |
data objectResponse data. null on failure.
Properties encryptedWorldId stringThe encrypted World ID generated by the server. Returned in both synchronous and asynchronous modes; used for subsequent build-status polling, detail queries, and exchanging a travel credential.status stringCurrent creation status:
stringWorld first-frame URL; null before it is generated. |
Error codes
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.
Next steps
After creating successfully, you can:
- Query World Build Status: poll every 3–5 seconds until the World enters
ready. - After the World enters
ready, call Get Travel Credential to exchange for a single-useticket. - Query World Detail: query the full creation metadata.