Skip to main content
Adventure

HappyOyster-Adventure-Create World API Reference

Create a world exploration World. Create a World from a natural-language prompt and a required first-frame image; 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-adventure/openapi/v1/worlds
curl --location 'https://dashscope-intl.aliyuncs.com/api/v2/apps/happyoyster-1.0-adventure/openapi/v1/worlds' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "async": true,
  "perspective": "third_person",
  "prompt": "Third-person tracking shot: a rider in a black snowsuit and black helmet drives a black snowmobile into the distance, the track kicking up fine snow. Ahead lies a snow-covered coniferous forest; farther off, steep sunlit rock cliffs of snow mountains under a blue sky with white clouds. Clear winter sky, strong snow highlights, open and crisp.",
  "eventStyle": "dramatic",
  "firstFrameImage": {
    "url": "https://g-adoc.alcasset.com/media/maas_docs/sfm-cn/common/images/6a4b3c2d1e0f9fc6.png",
    "referenceType": "default"
  }
}'
{
  "code": 0,
  "message": null,
  "data": {
    "encryptedWorldId": "enc_a1b2****",
    "status": "generating",
    "firstFrame": null
  }
}

Scope

Create an Adventure World. Before calling, confirm the following:
  • 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 an Adventure World. You do not need to pass mode; creationModel is always simple, uploadMode is fixed to first_frame.
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. 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

Perspective. Omitting this field returns 400000.

first_person,third_person
string
required

World theme description; Chinese and English are supported. Non-empty, up to 2000 characters. Missing, blank, or over-length returns 400000.

object
required

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.

boolean
defaulttrue

Whether to create asynchronously. Defaults to true. true: returns immediately; the World builds in the background, and the client polls Query World Build Status. false: the server polls every 3 seconds for up to 120 seconds and returns when the build completes; on timeout it still returns generating, and the client then polls on its own.

enum<string>
default"simple"

Creation sub-mode. Defaults to simple; Adventure supports only simple.

simple
enum<string>
default"first_frame"

Image upload mode. Defaults to first_frame; Adventure supports only first_frame.

first_frame
enum<string>
default"normal"

Event style, used to select the script-generation template. Defaults to normal. normal: regular / standard style (default). Completes 4-5 acts per the user's intent at a relatively steady pace, without forcing conflict, reversals, or a three-act climax. dramatic: dramatic / conflict style. Generates a script on a roughly 180-second three-act skeleton: opening hook, rising conflict, turning point, climactic resolution; for open-ended performance it arranges reversals by genre (mystery / thriller / comeback, etc.), with a denser pace and stronger drama. regular: legacy value, equivalent to normal. Kept only for backward compatibility with historical inputs; the server parses it as normal with identical behavior. Do not use it in new calls.

normal,dramatic,regular
string

Derive a new creation from an existing Adventure World. Must be an Adventure encrypted World ID under the current primary account; a World from another model or another primary account returns 403001.

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-Create World API Reference - QwenCloud