Tencent Hunyuan
Tencent Hunyuan texture API reference. Edit and generate PBR textures on 3D models using AI. Text or image-guided texturing with albedo, normal, and metallic maps.
Texture Edit
POST/v1/3d-models/tencent/texture-edit/
Apply AI-generated textures to an existing 3D model. You can guide the texture generation with either a reference image or a text prompt (not both at the same time). The input model must be in FBX format. Cost: 80 credits.
curl -X POST https://api.3daistudio.com/v1/3d-models/tencent/texture-edit/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_url": "https://example.com/model.fbx",
"prompt": "brushed metal surface with subtle scratches",
"enable_pbr": true
}'{
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created_at": "2026-02-25T12:00:00Z"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_url | string (URL) | Yes | URL to the source 3D model file. Must be in FBX format. |
| image | string | Conditional | Base64-encoded reference image (data:image/...;base64,...). Cannot be used together with prompt. |
| prompt | string | Conditional | Text description of the desired texture (max 1024 chars). Cannot be used together with image. |
| enable_pbr | boolean | No | Enable PBR texture output. Default: false. Only supported when using a prompt (not with image). |
Input Modes
You must provide exactly one of image or prompt. The two modes cannot be combined.
| Mode | Parameters | PBR Support | Use Case |
|---|---|---|---|
| Image-guided | file_url + image | No | Transfer the look of a reference image onto the model. |
| Text-guided | file_url + prompt | Yes (optional) | Describe the texture in words. Optionally enable PBR materials. |
Image-Guided Example
Use a reference image to guide the texture generation.
curl -X POST https://api.3daistudio.com/v1/3d-models/tencent/texture-edit/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_url": "https://example.com/model.fbx",
"image": "data:image/png;base64,iVBOR..."
}'Checking Status
GET/v1/generation-request/<task_id>/status/
Poll this endpoint with the task_id from the submit response. When status is "FINISHED", the results array contains your textured 3D model with download URLs and thumbnails. Results expire after 24 hours.
curl https://api.3daistudio.com/v1/generation-request/YOUR_TASK_ID/status/ \
-H "Authorization: Bearer YOUR_API_KEY"{
"status": "FINISHED",
"progress": 100,
"results": [
{
"asset_url": "https://cdn.3daistudio.com/models/textured_model.glb",
"asset": "https://storage.3daistudio.com/assets/textured_model.glb",
"asset_type": "3D_MODEL",
"thumbnail": "https://storage.3daistudio.com/thumbnails/textured_model.png"
}
]
}Credit Costs
| Operation | Credits |
|---|---|
| Texture Edit | 80 credits |
Processing Times
Texture editing typically takes 2–5 minutes depending on model complexity and the chosen input mode. PBR generation may add additional processing time.
Errors
Common errors for texture edit endpoints.
| Status | Error Code | Description |
|---|---|---|
| 402 | insufficient_credits | Not enough credits. Top up your wallet. |
| 429 | rate_limited | Rate limit exceeded. Wait and retry. |
| 400 | validation_failed | Missing or invalid parameters. Check that exactly one of image or prompt is provided, and that enable_pbr is only used with prompt. |