> ## Documentation Index
> Fetch the complete documentation index at: https://docs.poyo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hunyuan 3D v3.1

> Hunyuan 3D v3.1 API 使用 Pro 或 Rapid 从文本或单张图像生成 3D 模型。Pro 可接受额外视角图、目标面数、PBR 材质或仅几何的 GLB；Rapid 可返回带纹理的模型或无纹理的白模。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

Hunyuan 3D v3.1 通过四个公开 model ID 提供 Pro 和 Rapid 的文生 3D 与图生 3D 模型。

## 模型

* **hunyuan-3d/v3.1/pro/image-to-3d** - 从一张正视图生成 Pro 3D 模型，可附加额外视角图
* **hunyuan-3d/v3.1/pro/text-to-3d** - 从文本提示词生成 Pro 3D 模型
* **hunyuan-3d/v3.1/rapid/text-to-3d** - 从文本提示词更快地生成 Rapid 3D 模型
* **hunyuan-3d/v3.1/rapid/image-to-3d** - 从一张图像更快地生成 Rapid 3D 模型

## 必填参数

* **model**：四个 Hunyuan 3D v3.1 公开 model ID 之一
* **input.prompt**：文生 3D 模型必填
* **input.image\_urls**：图生 3D 模型必填。只能传一个图像 URL。

## 可选参数

* **generate\_type**：仅 Pro 模型。`Normal` 或 `Geometry`
* **enable\_pbr**：启用 PBR 材质生成。仅几何生成时忽略
* **face\_count**：仅 Pro 模型。目标面数，范围 `40000` 到 `1500000`；默认 `500000`
* **enable\_geometry**：仅 Rapid 模型。生成不带纹理的仅几何白模
* **back\_image\_url**、**left\_image\_url**、**right\_image\_url**、**top\_image\_url**、**bottom\_image\_url**、**left\_front\_image\_url**、**right\_front\_image\_url**：仅 Pro 图生 3D。可选的额外物体视角图
* **callback\_url**：可选，任务完成通知的 Webhook URL

## 输出

任务结果可能包括：

* `model_glb` 或其他返回的 3D 模型文件
* `thumbnail`
* `model_urls`：可用时包括 `glb`、`obj`、`mtl`、`texture` 及其他格式
* 可用时包括纹理和材质文件

每个文件条目在可用时包括 `label`、`file_url`、`file_type`、`format`、`content_type`、`file_name` 和 `file_size`。

## 注意事项

* 图生 3D 模型在 `image_urls` 中只接受一张必填图像。
* Pro 图生 3D 还可接受可选的、按名称区分的额外视角图 URL。
* API 返回异步任务状态。请轮询统一的 3D 任务状态接口，或使用 `callback_url`。


## OpenAPI

````yaml zh/api-manual/3d-series/hunyuan-3d-3-1.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Hunyuan 3D v3.1 API
  description: >-
    Hunyuan 3D v3.1 API 使用 Pro 或 Rapid 根据文本或一张图片生成 3D 模型。Pro 可接受额外视角、目标面数、PBR
    材质，或仅输出几何体 GLB；Rapid 可返回带纹理的模型或无纹理的白模。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Hunyuan 3D v3.1
      summary: 提交 Hunyuan 3D v3.1 任务
      description: 使用 Hunyuan 3D v3.1 Pro 或 Rapid 根据文本或一张图片生成 3D 模型。
      operationId: submitHunyuan3D31Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              pro-image-to-3d:
                summary: Pro 图生 3D
                value:
                  model: hunyuan-3d/v3.1/pro/image-to-3d
                  callback_url: https://your-domain.com/callback
                  input:
                    image_urls:
                      - https://example.com/object-front.png
                    generate_type: Normal
                    enable_pbr: true
                    face_count: 500000
              pro-text-to-3d:
                summary: Pro 文生 3D
                value:
                  model: hunyuan-3d/v3.1/pro/text-to-3d
                  input:
                    prompt: >-
                      A detailed sci-fi cargo drone with compact landing legs
                      and panel seams
                    generate_type: Normal
                    enable_pbr: true
                    face_count: 500000
              rapid-text-to-3d:
                summary: Rapid 文生 3D
                value:
                  model: hunyuan-3d/v3.1/rapid/text-to-3d
                  input:
                    prompt: A rustic wooden treasure chest with metal bands
                    enable_pbr: false
              rapid-image-to-3d:
                summary: Rapid 图生 3D
                value:
                  model: hunyuan-3d/v3.1/rapid/image-to-3d
                  input:
                    image_urls:
                      - https://example.com/object-front.png
                    enable_geometry: false
                    enable_pbr: false
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - hunyuan-3d/v3.1/pro/image-to-3d
            - hunyuan-3d/v3.1/pro/text-to-3d
            - hunyuan-3d/v3.1/rapid/text-to-3d
            - hunyuan-3d/v3.1/rapid/image-to-3d
        callback_url:
          type: string
          format: uri
        input:
          $ref: '#/components/schemas/Hunyuan3D31Input'
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
    Hunyuan3D31Input:
      type: object
      properties:
        prompt:
          type: string
          description: 文生 3D 模型必填。Pro 最多支持 1024 个字符；Rapid 最多支持 200 个字符。
        image_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
          description: 图生 3D 模型必填。必须恰好传一个图片 URL。
        generate_type:
          type: string
          enum:
            - Normal
            - Geometry
          description: 仅用于 Pro 模型。
        enable_pbr:
          type: boolean
          description: 仅几何体生成时忽略此参数。
        face_count:
          type: integer
          minimum: 40000
          maximum: 1500000
          default: 500000
          description: 仅用于 Pro 模型。
        enable_geometry:
          type: boolean
          description: 仅用于 Rapid 模型。
        back_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
        left_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
        right_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
        top_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
        bottom_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
        left_front_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
        right_front_image_url:
          type: string
          format: uri
          description: 仅用于 Pro 图生 3D。
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.