Worlds

World を作成

World Labs Marble のワールド生成タスクを作成します

POST
/v1/worlds/generations

World Labs Marble で探索可能な 3D ワールドを生成します。この API は非同期です。作成レスポンスにはタスク識別子と、ステータス確認用の poll_url が返ります。

Models API で現在利用可能な Marble モデルを選んでください。

リクエストボディ

modelstringデフォルト: marble-1.0

Models API で現在利用可能な Marble モデルを選んでください。

promptstring

テキストのみの生成、または画像・動画入力時のガイダンスとして使うテキストプロンプトです。

world_promptobject

高度な呼び出し向けの World Labs ネイティブ world_prompt オブジェクトです。対応タイプは text、image、multi-image、video です。

imagestring

Base64 または data URL の画像プロンプトです。

image_urlstring

画像 URL プロンプトです。

imagesarray

簡易 multi-image 生成用の複数画像プロンプトです。最大 4 枚まで指定できます。World Labs ネイティブの再構成モードでは、world_prompt.type="multi-image" と reconstruct_images: true を指定し、最大 8 枚まで渡せます。

video_urlstring

動画 URL プロンプトです。

is_panoboolean | string

画像入力では、既存のパノラマなら true、通常の単一画像なら false、または auto を指定します。

seedinteger

任意のシード値です。0 から 4294967295 まで指定できます。

display_namestring

生成されるワールドの任意の表示名です。最大 64 文字です。

tagsarray

任意の World Labs タグです。最大 10 個、各タグ最大 32 文字です。

permissionobject

任意の公開範囲とアクセス設定です:public、allow_id_access、allowed_readers、allowed_writers。public: true は公開されるワールドの作成を要求します。

レスポンス

idstring

ポーリング用の公開タスク ID です。

task_idstring

非同期タスク識別子の別名です。

operation_idstring

World Labs のオペレーション ID です。

poll_urlstring

このタスクに推奨されるポーリング URL です。

statusstring

タスク状態:pending、processing、completed、failed。

world_marble_urlstring

完了時の生成済み Marble ワールド URL です。

glb_urlstring

利用可能な場合のコライダーメッシュ GLB URL です。

pano_urlstring

利用可能な場合のパノラマ画像 URL です。

料金

現在の料金は Pricing API で確認してください。最終請求額は利用記録に表示されます。返された cost.total_credits は生成使用量であり、通貨の金額ではありません。

リクエスト

curl -X POST "https://api.tokenlab.sh/v1/worlds/generations" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "marble-1.1",
    "prompt": "夕暮れの静かな海辺の町、細い路地と温かな灯り"
  }'
{  "id": "string",  "task_id": "string",  "operation_id": "string",  "status": "pending",  "poll_url": "string",  "world_id": "string",  "world_marble_url": "string",  "model_url": "string",  "glb_url": "string",  "pano_url": "string",  "thumbnail_url": "string",  "caption": "string",  "cost": {},  "error": "string",  "error_details": {    "projection_version": 0,    "status": 400,    "message": "string",    "type": "string",    "code": "string",    "param": "string",    "retryable": true,    "upstream": {      "source": "string",      "code": "string",      "message": "string",      "param": "string"    }  }}

認証

BearerAuth
AuthorizationBearer <token>

APIキー認証。Dashboard > API > API KeysでAPIキーを作成または管理します。

場所: header

ヘッダー

X-TokenLab-Delivery-Policy?string

リクエストごとの配信ポリシー。APIキーおよびWorkspaceのデフォルト設定を上書きします。自動的にまず TokenLab Verified を試行し、出力、リクエストの受け入れ、または永続的なリソース作成の前に、一度だけ Official に切り替える場合があります。

指定できる値

  • "auto"
  • "verified"
  • "official"

リクエストボディ

application/json

レスポンス

application/json

application/json

application/json