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
Lấy World
Lấy một World Labs Marble world đã hoàn tất
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"
}
}Lấy Marble World đã hoàn tất được tạo qua TokenLab. world phải thuộc cùng tổ chức với API key.
Tham số đường dẫn
string
bắt buộc
ID thế giới World Labs.
Phản hồi
string
ID thế giới World Labs.
string
URL của thế giới World Labs Marble.
object
Asset World đã tạo khi có sẵn.
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());
Ủy quyền
Xác thực bằng Khóa API. Tạo hoặc quản lý khóa API trong Dashboard > API > API Keys.
Tham số đường dẫn
ID thế giới.