curl -X POST "https://api.tokenlab.sh/v1/worlds/list" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"page_size": 20, "status": "SUCCEEDED", "model": "marble-1.1"}'
import requests
response = requests.post(
"https://api.tokenlab.sh/v1/worlds/list",
headers={"Authorization": "Bearer sk-your-api-key"},
json={"page_size": 20, "status": "SUCCEEDED", "model": "marble-1.1"},
)
print(response.json()["worlds"])
const response = await fetch('https://api.tokenlab.sh/v1/worlds/list', {
method: 'POST',
headers: {
Authorization: 'Bearer sk-your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ page_size: 20, status: 'SUCCEEDED', model: 'marble-1.1' })
});
console.log((await response.json()).worlds);
{
"worlds": [
{
"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": {}
}
],
"next_page_token": "<string>"
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}Worlds
Worlds auflisten
Listet abgeschlossene World Labs Marble Worlds aus TokenLab auf
POST
/
v1
/
worlds
/
list
curl -X POST "https://api.tokenlab.sh/v1/worlds/list" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"page_size": 20, "status": "SUCCEEDED", "model": "marble-1.1"}'
import requests
response = requests.post(
"https://api.tokenlab.sh/v1/worlds/list",
headers={"Authorization": "Bearer sk-your-api-key"},
json={"page_size": 20, "status": "SUCCEEDED", "model": "marble-1.1"},
)
print(response.json()["worlds"])
const response = await fetch('https://api.tokenlab.sh/v1/worlds/list', {
method: 'POST',
headers: {
Authorization: 'Bearer sk-your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ page_size: 20, status: 'SUCCEEDED', model: 'marble-1.1' })
});
console.log((await response.json()).worlds);
{
"worlds": [
{
"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": {}
}
],
"next_page_token": "<string>"
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}Liste abgeschlossene World Labs Marble Worlds auf, die über TokenLab erstellt wurden. Ergebnisse sind auf deine Organisation begrenzt; TokenLab veröffentlicht nicht die kontoübergreifende Upstream-Liste.
Nutze
/v1/worlds/generations/{id} für ausstehende oder fehlgeschlagene Generierungsaufgaben. Diese Liste enthält nur abgeschlossene Worlds, die TokenLab nach der Generierung indexiert hat.
Anfragekörper
integer
Standard:"20"
Anzahl der zurückgegebenen Worlds, 1 bis 100.
string
Paginierungs-Token aus der vorherigen Antwort.
string
Optionaler Filter:
SUCCEEDED, PENDING, RUNNING oder FAILED. Dieser Endpunkt listet abgeschlossene Worlds auf; die anderen drei Werte liefern eine leere Liste. Den Fortschritt finden Sie beim Generierungstask.string
Optionaler Marble-Modellfilter.
array
Optionaler Tag-Filter.
boolean
Optionaler Sichtbarkeitsfilter.
string
Gibt nur Worlds zurück, die nach diesem Zeitpunkt erstellt wurden.
string
Gibt nur Worlds zurück, die vor diesem Zeitpunkt erstellt wurden.
string
Standard:"created_at"
Sortieren nach
created_at oder updated_at.string
Standard:"desc"
Sortierrichtung:
asc oder desc.Antwort
array
Array von World-Datensätzen.
string | null
Token für die nächste Seite oder
null.curl -X POST "https://api.tokenlab.sh/v1/worlds/list" \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"page_size": 20, "status": "SUCCEEDED", "model": "marble-1.1"}'
import requests
response = requests.post(
"https://api.tokenlab.sh/v1/worlds/list",
headers={"Authorization": "Bearer sk-your-api-key"},
json={"page_size": 20, "status": "SUCCEEDED", "model": "marble-1.1"},
)
print(response.json()["worlds"])
const response = await fetch('https://api.tokenlab.sh/v1/worlds/list', {
method: 'POST',
headers: {
Authorization: 'Bearer sk-your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ page_size: 20, status: 'SUCCEEDED', model: 'marble-1.1' })
});
console.log((await response.json()).worlds);
Autorisierungen
API-Key-Authentifizierung. Erstellen oder verwalten Sie API-Keys unter Dashboard > API > API Keys.
Body
application/json
Erforderlicher Bereich:
1 <= x <= 100Verfügbare Optionen:
SUCCEEDED, PENDING, FAILED, RUNNING Verfügbare Optionen:
marble-1.0, marble-1.1, marble-1.1-plus, marble-1.0-draft Verfügbare Optionen:
created_at, updated_at TokenLab-Erweiterung für aufsteigende oder absteigende Reihenfolge.
Verfügbare Optionen:
asc, desc