Skip to content

Hunyuan 3D 3.1 Pro

Textured 3D models (GLB and OBJ) from a text prompt or an image, with optional extra views, PBR materials and face-count control.

  • by Tencent
  • 3D
  • from $0.225/generation
On this page

1.Call

3D models run as jobs: create one, then poll, follow progress over Server-Sent Events, or receive a webhook. The result lists every file (GLB, OBJ, ...) on cdn.ewest.ai. Every response carries an x-request-id trace ID.

# 1. Create the job (text to 3D; send "image_url" instead of "prompt" to build from an image)
curl https://api.ewest.ai/v1/3d/generations \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ewest/hunyuan-3d-3.1-pro", "prompt": "a ceramic teapot with a bamboo handle", "enable_pbr": true}'
# → 202 {"id": "job_…", "type": "3d", "status": "queued", "progress": 0, …}

# 2. Follow it (Server-Sent Events), or poll GET /v1/jobs/job_…
curl -N https://api.ewest.ai/v1/jobs/job_…/events -H "Authorization: Bearer $EWEST_KEY"
# → … "output": {"url": "https://cdn.ewest.ai/3d/….glb", "files": {"glb": {…}, "obj": {…}}}

2.Authentication

Send your API key in the Authorization: Bearer header, as the examples above do (clients built for the Anthropic API can use x-api-key). Create keys under API keys. Keep the key on your server, never in browser code. More in the authentication guide.

3.Jobs

3D generation runs as a job. The create call answers 202 with a job; follow it with GET /v1/jobs/{id}/events (Server-Sent Events), poll GET /v1/jobs/{id}, or pass a webhook_url. The status is one of queued, running, succeeded or failed; the file is in output.url once it has succeeded. See the 3D guide.

4.Schema

What you send and what comes back, for ewest/hunyuan-3d-3.1-pro. The output tables are read from the API's OpenAPI description.

Input

POST /v1/3d/generations
  • modelstringRequired
    The model id, ewest/hunyuan-3d-3.1-pro.
  • promptstringOptional
    What to build, as text. Up to 1,024 characters. Send prompt or image_url, not both.
  • image_urlstringOptional
    Public https URL of the front view (JPEG, PNG or WebP, 128 to 5,000 px, up to 8 MB) to build from an image.
  • view_imagesobjectOptional
    Extra views as view name to public https URL (JPEG or PNG). Needs image_url. Views: back, left, right, top, bottom, left_front, right_front.
  • generate_typestringOptionaldefault normal
    normal for a textured model, geometry for an untextured one.
  • enable_pbrbooleanOptionaldefault false
    Add PBR material textures (metallic, roughness, normal). Not with generate_type: geometry.
  • face_countintegerOptionaldefault 500000
    Target polygon count, 40,000 to 1,500,000.
  • webhook_urlstringOptional
    Public https URL that receives a POST with the finished job.

Output

Returns a 3D model. POST /v1/3d/generations answers 202: The job, queued. GET /v1/jobs/{id} answers 200: The job.

  • idstringAlways
    Also the trace id (x-request-id).
  • objectstringAlways
    Always job.
  • typestringAlways
    Always 3d.
  • modelstringAlways
    The model that runs the job.
  • statusstringAlways
    queued and running are in progress; succeeded and failed are final. One of queued, running, succeeded, failed.
  • progressintegerAlways
    Estimated from elapsed time; 0 for failed jobs.
  • eta_secondsinteger or nullAlways
    Expected seconds left; null when finished or when the job runs longer than usual.
  • created_atintegerAlways
    Unix seconds when the job was created.
  • started_atinteger or nullAlways
    Unix seconds when the model started generating; null while the job is queued.
  • completed_atinteger or nullAlways
    Unix seconds when the job reached succeeded or failed; null while it is in progress.
  • inputobjectAlways
    The parameters of a 3D job, defaults filled in. Exactly one of prompt and image_url is set. The options a model does not take, or that were not sent, are null.
  • input.promptstring or nullAlways
    The text prompt, or null for an image job.
  • input.image_urlstring (uri) or nullAlways
    The front view, or null for a text job.
  • input.view_imagesobject or nullAlways
    The extra views (view name to URL), or null.
  • input.generate_typestringAlways
    One of normal, geometry.
  • input.enable_pbrbooleanAlways
    Whether PBR materials were requested.
  • input.face_countinteger or nullAlways
    The requested polygon count, or null for the model's default.
  • input.texture_qualitystring or nullAlways
    standard or detailed when sent, else null.
  • input.geometry_qualitystring or nullAlways
    standard or detailed when sent, else null.
  • input.quadboolean or nullAlways
    Whether a quad mesh was requested, when sent.
  • input.negative_promptstring or nullAlways
    What to avoid, when sent.
  • input.seedinteger or nullAlways
    The seed, when sent.
  • input.auto_sizeboolean or nullAlways
    Whether real-world scaling was requested, when sent.
  • input.orientationstring or nullAlways
    default or align_image, when sent.
  • input.texture_alignmentstring or nullAlways
    original_image or geometry, when sent.
  • outputobject or nullAlways
    Set once the job succeeded, null before and when it failed. The file is on cdn.ewest.ai for 7 days.
  • output.urlstring (uri)Always (when set)
    Link to the main file: the GLB (the same as files.glb.url), or the FBX for a quad mesh (quad: true), which has no GLB.
  • output.content_typestringAlways (when set)
    model/gltf-binary for the GLB; application/octet-stream for the FBX of a quad mesh. One of model/gltf-binary, application/octet-stream.
  • output.filesobjectAlways (when set)
    Every file by format: glb (not for quad meshes), pbr_glb (a second GLB with PBR materials, Tripo H3.1), and as the model returns them obj (with its mtl and texture), fbx, usdz.
  • output.thumbnail_urlstring (uri) or nullAlways (when set)
    A preview image, or null.
  • errorobject or nullAlways
    Set when the job failed, null otherwise.
  • error.codestring or nullAlways (when set)
    Why the job failed. generation_failed: The model could not generate the output; retry, or contact support if it keeps happening. content_policy: The prompt or an input was rejected by the model's safety filters. image_download_failed: An input image (image_url or end_image_url) could not be downloaded; check that its URL is public and returns the image. timeout: Generation took too long and was stopped. storage_error: The output was generated but could not be stored; retry. cancelled: You cancelled the job (POST /v1/jobs/{id}/cancel) before it started; it is not charged. One of generation_failed, content_policy, image_download_failed, timeout, storage_error, cancelled.
  • error.messagestringAlways (when set)
    A fixed, readable explanation for the code. Branch on code, not on this text.
  • usageobject or nullAlways
    Billed units once the 3D job succeeded, null before and when it failed: {"generations": 1}.
  • usage.generationsintegerAlways (when set)
    Number of generations billed (1).

Sample response

{
  "id": "job_7Hq2xK9mPz",
  "object": "job",
  "type": "3d",
  "model": "ewest/hunyuan-3d-3.1-pro",
  "created_at": 1793530277,
  "input": {
    "prompt": "a ceramic teapot with a bamboo handle",
    "image_url": null,
    "view_images": null,
    "generate_type": "normal",
    "enable_pbr": true,
    "face_count": null,
    "texture_quality": null,
    "geometry_quality": null,
    "quad": null,
    "negative_prompt": null,
    "seed": null,
    "auto_size": null,
    "orientation": null,
    "texture_alignment": null
  },
  "status": "queued",
  "progress": 2,
  "eta_seconds": 240,
  "started_at": null,
  "completed_at": null,
  "output": null,
  "error": null,
  "usage": null
}

5.Details

Input
Text prompt (up to 1,024 characters) or an image, optionally with up to 7 extra views
Options
PBR materials, geometry-only output, face count 40,000 to 1,500,000
Output
GLB and OBJ files on cdn.ewest.ai (kept 7 days)
Typical time
3 to 6 minutes