Skip to content

Text-to-3D and image-to-3D code samples

Each script submits one request, polls every 5 seconds and prints the model file URLs. Set API_KEY in your environment first.

Text to 3D

# 1. Start the generation. Reuse the same Idempotency-Key only when retrying this request.
curl -X POST https://ai3d.studio/v1/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"mediaType":"3d","model":"tripo-h3-1","scene":"text-to-3d","prompt":"a wooden rocking chair with a woven seat, game asset"}'

# 2. Poll every 5 seconds with the id from data.id until data.workflow.isTerminal is true.
curl -H "Authorization: Bearer $API_KEY" \
  https://ai3d.studio/v1/workflows/WORKFLOW_ID

Image to 3D

Pass the picture as a public https URL in options.image (the sample uses https://example.com/images/chair.png). The API does not take file bytes, multipart uploads or base64; host the image first, for example on your own storage with a signed URL that stays valid for a few minutes.

# 1. Start the generation. Reuse the same Idempotency-Key only when retrying this request.
curl -X POST https://ai3d.studio/v1/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"mediaType":"3d","model":"tripo-h3-1","scene":"image-to-3d","options":{"image":"https://example.com/images/chair.png"}}'

# 2. Poll every 5 seconds with the id from data.id until data.workflow.isTerminal is true.
curl -H "Authorization: Bearer $API_KEY" \
  https://ai3d.studio/v1/workflows/WORKFLOW_ID

Other models and options

Swap model for any id on the pricing page and add options from GET /v1/capabilities. Options you leave out take their defaults.