// 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.

base url: https://polydrop.dev/api/v1

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:

1 cr
sonnet
fast & cheap
3 cr
opus
max quality
1 cr
+ animated
animation surcharge
GET

/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 }
}
GET

/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 }
}
GET

/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 } ] }
}
GET

/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…
POST

/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 }
}

Errors & Limits

401 missing or invalid API key
402 not enough credits — top up and retry
403 asset belongs to another account
409 GLB not baked yet and server bake failed — open the asset once in the web editor
429 rate limited — 60 requests/min, 5 generations/min per key
502 generation failed — credits auto-refunded, safe to retry

GOT A PROMPT? THE REST TAKES SECONDS.

sign up → describe → drop it into your game

Start Generating →