Browse documentationHTTP API & Automation

HTTP API & Automation

Integrate KardMesh into custom 3D pipelines, CI asset tools, and AI agent workflows.

Last updated November 13, 2026

Base URL & Authentication

All programmatic requests use the clean API host:

https://api.kardmesh.com

Authenticate with a personal API key (unlocked after any purchase) using the Authorization header:

Authorization: Bearer km_your_personal_api_key

Submitting a generation job

Send a multipart/form-data POST request to https://api.kardmesh.com/jobs with an Idempotency-Key header (recommended UUID v4) to safely retry network interruptions without double-charging credits:

curl -X POST https://api.kardmesh.com/jobs \
  -H "Authorization: Bearer $KARDMESH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@character.png" \
  -F "seeds=42,43" \
  -F "steps=50" \
  -F "cfg=2.0" \
  -F "colors=true" \
  -F "chains=true"

The endpoint returns 202 / JSON containing { "id": "km-...", "status": "pending" }.

Polling & downloading the ZIP

Poll GET https://api.kardmesh.com/jobs/{jobId} with the same Authorization header:

  • While running, the API returns JSON status (pending, submitting, or running).
  • Once complete, the endpoint responds with Content-Type: application/zip containing the generated archive stream.
  • If GPU execution fails, reserved credits are refunded automatically.
curl -L https://api.kardmesh.com/jobs/km-your-job-id \
  -H "Authorization: Bearer $KARDMESH_API_KEY" \
  -o kardmesh_output.zip

Account & history endpoints

  • GET https://api.kardmesh.com/account/credits — Inspect current credit balance and purchase status.
  • GET https://api.kardmesh.com/account/jobs?limit=20&offset=0 — Paginated generation history.

Machine-readable specs & agent discovery