// API Documentation
Generate low-poly assets and pull .glb files straight into your project — build pipelines, editor plugins, CI steps. One key, plain JSON, no SDK needed.
Authentication
Create a key under Profile → API Keys, then send it with every request. Keys spend your credits — keep them out of public repos.
Authorization: Bearer pg_YOUR_KEY
Credits & Costs
Generation spends credits from your balance — downloads and listings are free. Current prices:
/me
Your account, credit balance and current prices.
curl https://polydrop.dev/api/v1/me \ -H "Authorization: Bearer pg_YOUR_KEY"
{
"name": "Murat", "credits": 144, "assets": 22,
"costs": { "generate": { "sonnet": 1, "opus": 3 }, "animation": 1 }
}
/assets
List your assets, newest first.
query: page, per_page (max 100)
curl "https://polydrop.dev/api/v1/assets?per_page=25" \ -H "Authorization: Bearer pg_YOUR_KEY"
{
"data": [ { "id": 23, "name": "Wooden Barrel", "category": "prop",
"latest_version": 1, "triangles": 960, "glb_url": "…/assets/23/glb" } ],
"meta": { "page": 1, "per_page": 25, "total": 22 }
}
/assets/{id}
One asset with its full version history.
curl https://polydrop.dev/api/v1/assets/23 \ -H "Authorization: Bearer pg_YOUR_KEY"
{
"data": { "id": 23, "name": "Wooden Barrel",
"versions": [ { "version": 1, "prompt": "…", "model": "sonnet", "glb_ready": true } ] }
}
/assets/{id}/glb
Download the asset as a binary .glb — animation baked in as keyframes when the asset has one. If a version was never baked, the server bakes it on the fly.
query: version (default: latest)
curl https://polydrop.dev/api/v1/assets/23/glb \ -H "Authorization: Bearer pg_YOUR_KEY" \ -o barrel.glb
binary model/gltf-binary — drop it into Unity, Godot, Unreal, three.js…
/generate
Generate a brand-new asset from a prompt. Spends credits up front — refunded automatically if generation fails. Synchronous: the response arrives when the asset is ready (~10–90s, keep the request open).
body: prompt (required) · model: sonnet|opus · animated: bool · name · category
curl -X POST https://polydrop.dev/api/v1/generate \
-H "Authorization: Bearer pg_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "a low poly wooden barrel with metal bands", "model": "sonnet", "animated": false}'
{
"data": { "asset_id": 23, "name": "Wooden Barrel", "version": 1,
"triangles": 960, "glb_url": "https://polydrop.dev/api/v1/assets/23/glb" },
"credits": { "charged": 1, "balance": 144 }
}