Skip to main content
Directing

HappyOyster-Directing-Create World API Reference

Create a real-time directing World. Supports standard mode (natural-language prompt) and script mode (structured ScriptList); the API immediately returns an encrypted World ID, the World builds asynchronously in the background, and the client polls the build progress until it completes.

POST
/api/v2/apps/happyoyster-1.0-directing/openapi/v1/worlds
curl --location 'https://dashscope-intl.aliyuncs.com/api/v2/apps/happyoyster-1.0-directing/openapi/v1/worlds' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "async": true,
  "creationModel": "simple",
  "eventStyle": "normal",
  "prompt": "First-person (POV) interactive video: the camera simulates my own eyes, locked on a white Maltese puppy directly in front of me — white chef\u2019s hat, black-buttoned chef\u2019s coat. Soft home-kitchen background, warm light, the puppy\u2019s gaze always facing the camera.",
  "resolution": "720p",
  "layout": "Stable",
  "narrative": "Calm"
}'
{
  "code": 0,
  "message": null,
  "data": {
    "encryptedWorldId": "enc_a1b2****",
    "status": "generating",
    "firstFrame": null
  }
}

Scope

  • Only the primary API Key is supported; temporary API Keys cannot be used (error code 403003).
  • Asynchronous mode is recommended: async=true, the API immediately returns encryptedWorldId; poll Query World Build Status for progress.
  • This endpoint can only create a Directing World. You do not need to pass mode (the server writes 2; passing a value other than 2 returns 400000). creationModel supports simple and scriptlist; the enter-room version is fixed to storyV2, and aspectRatio and maxExperienceTimeSec are fixed to null.
If the model call fails and returns an error, see HappyOyster Error Codes to resolve it.

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. 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.

Body

application/json
enum<string>
required

Video resolution.

480p,720p
boolean
defaulttrue

Whether to create asynchronously. Defaults to true. true: returns immediately; the World builds in the background. false: the server polls every 3 seconds for up to 120 seconds and returns when the build completes.

enum<string>
default"simple"

Creation sub-mode. simple (standard mode, default): natural-language prompt, the server generates the full script. scriptlist (script mode): structured script provided by the user.

simple,scriptlist
enum<string>
default"normal"

Event style, used to select the script-generation template. Defaults to normal.

normal,dramatic,regular
string

Derive a new creation from an existing Directing World. Must be a Directing encrypted World ID under the current primary account.

string

World theme description; Chinese and English are supported. Non-empty, up to 2000 characters. Required for simple mode.

enum<string>

Camera movement style. Optional for simple mode.

Stable,Fast,Calm
enum<string>

Narrative style. Optional for simple mode.

Calm,Dramatic,Normal,Steady
object

An image reference reused directly as the World's first frame. url and base64 are mutually exclusive (choose one). Image constraints: format JPG/JPEG/PNG/WebP; strictly less than 6 MB per image; aspect ratio must be landscape, width/height of 1.5-2.0; failing content-safety or copyright/IP verification returns 403004/403005.

object[]

Used for script generation and character reference images, up to 6 images, independent of firstFrameImage. Optional for simple mode.

object

Structured script. Required for scriptlist mode. Must include synopsis and a non-empty acts.

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.