curl "https://api.tokenlab.sh/v1/worlds/world_123" \
-H "Authorization: Bearer sk-your-api-key"
import requests
response = requests.get(
"https://api.tokenlab.sh/v1/worlds/world_123",
headers={"Authorization": "Bearer sk-your-api-key"},
)
print(response.json()["world_id"])
const response = await fetch('https://api.tokenlab.sh/v1/worlds/world_123', {
headers: { Authorization: 'Bearer sk-your-api-key' }
});
console.log(await response.json());
{
"world_id": "<string>",
"display_name": "<string>",
"world_marble_url": "<string>",
"assets": {},
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"permission": {},
"tags": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z",
"world_prompt": {}
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}Worlds
World を取得
完了済み World Labs Marble world を取得します
GET
/
v1
/
worlds
/
{id}
curl "https://api.tokenlab.sh/v1/worlds/world_123" \
-H "Authorization: Bearer sk-your-api-key"
import requests
response = requests.get(
"https://api.tokenlab.sh/v1/worlds/world_123",
headers={"Authorization": "Bearer sk-your-api-key"},
)
print(response.json()["world_id"])
const response = await fetch('https://api.tokenlab.sh/v1/worlds/world_123', {
headers: { Authorization: 'Bearer sk-your-api-key' }
});
console.log(await response.json());
{
"world_id": "<string>",
"display_name": "<string>",
"world_marble_url": "<string>",
"assets": {},
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"permission": {},
"tags": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z",
"world_prompt": {}
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}TokenLab で作成された完了済み Marble world を取得します。world は API キーと同じ組織に属している必要があります。
パスパラメータ
string
必須
World Labs のワールド ID です。
レスポンス
string
World Labs のワールド ID です。
string
World Labs Marble ワールドの URL。
object
利用可能な場合は生成済みの World アセットを返します。
curl "https://api.tokenlab.sh/v1/worlds/world_123" \
-H "Authorization: Bearer sk-your-api-key"
import requests
response = requests.get(
"https://api.tokenlab.sh/v1/worlds/world_123",
headers={"Authorization": "Bearer sk-your-api-key"},
)
print(response.json()["world_id"])
const response = await fetch('https://api.tokenlab.sh/v1/worlds/world_123', {
headers: { Authorization: 'Bearer sk-your-api-key' }
});
console.log(await response.json());
承認
APIキー認証。Dashboard > API > API KeysでAPIキーを作成または管理します。
パスパラメータ
ワールドID。