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

# 3D生成

<Note>
  注意：目前仅 `hunyuan-3d`、`hunyuan-3d-pro`、`hunyuan-3d-pro-fast`、`doubao-seed3d-1.0` 模型支持3D生成，其他模型不支持。
</Note>

### 请求/响应参数明细


## OpenAPI

````yaml openapi.yaml POST /image3ds/generations
openapi: 3.1.0
info:
  title: 极客智坊 API文档
  description: 极客智坊 API 消息接口规范文档
  version: 1.0.0
servers:
  - url: https://geekai.co/api/v1
    description: 国内代理入口
  - url: https://geekai.dev/api/v1
    description: 海外代理入口
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /image3ds/generations:
    post:
      tags:
        - Image3d
      summary: 3D图片生成接口
      description: 基于文本提示/参考图生成3D的接口，支持多种图片生成模型和参数配置
      operationId: createImage3d
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
              properties:
                model:
                  type: string
                  description: 3D模型
                  example: hunyuan-3d
                prompt:
                  type: string
                  description: 文本提示
                  example: 画一只可爱的小猫
                image:
                  type: string
                  description: 基于图片生成3D，支持图片URL/Base64编码，如果包含多视角则该参数值为前视图，大小不超过8M
                multi_view_images:
                  type: array
                  description: 多视角图片列表，仅混元3D和混元3D专业版支持该参数，支持图片URL/Base64编码。
                  items:
                    type: object
                    properties:
                      view_type:
                        type: string
                        description: 视角类型，视角参考值：left：左视图；right：右视图；back：后视图
                        enum:
                          - back
                          - left
                          - right
                        example: left
                      view_image_url:
                        type: string
                        description: 视角图片URL，每个视角仅限制一张图片，格式为png/jpg，大小不超过8M
                result_format:
                  type: string
                  description: 3D输出格式设置，仅混元3D支持该参数，豆包3D通过文本提示指令设置。
                  enum:
                    - OBJ，GLB，STL，USDZ，FBX，MP4
                  default: OBJ
                enable_pbr:
                  type: boolean
                  description: 是否开启PBR材质，默认false，仅混元3D支持该参数。
                  default: false
                face_count:
                  type: integer
                  description: 3D模型面数，仅混元3D专业版支持该参数，默认500000，取值范围[40000,1500000]
                  default: 500000
                extra_body:
                  type: object
                  description: 额外参数配置项，以适配不同3D模型的多样化配置，仅混元3D专业版支持该参数。
                  properties:
                    generate_type:
                      type: string
                      description: >-
                        生成任务类型，默认Normal，参考值： - Normal：可生成带纹理的几何模型。 -
                        LowPoly：可生成智能减面后的模型。 -
                        Geometry：可生成不带纹理的几何模型（白模），选择此任务时，`enable_pbr` 参数不生效。 -
                        Sketch：可输入草图或线稿图生成模型，此模式下 `prompt` 和 `image` 可一起输入。
                      enum:
                        - Normal
                        - LowPoly
                        - Geometry
                        - Sketch
                      default: Normal
                    polygon_type:
                      type: string
                      description: >-
                        多边形类型， 表示模型的表面由几边形网格构成。该参数仅在 `generate_type`  中选择
                        `LowPoly` 模式可生效。参考值： - triangle：三角形面。 -
                        quadrilateral：四边形面与三角形面混合生成。
                      enum:
                        - triangle
                        - quadrilateral
                      default: triangle
                async:
                  type: boolean
                  description: 是否异步生成，默认false，即同步等待图片生成成功后返回生成结果，如果异步需要通过调用图片获取接口获取生成结果
                  default: false
                retries:
                  type: integer
                  description: 自动重试次数，默认0，表示失败不重试
                  default: 0
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                required:
                  - created
                  - data
                properties:
                  task_id:
                    type: string
                    description: 任务ID
                    format: uuid
                  task_status:
                    type: string
                    description: 任务状态
                    enum:
                      - pending
                      - running
                      - succeed
                      - failed
                    example: running
                  created:
                    type: integer
                    description: 创建时间戳
                    format: unix-timestamp
                  data:
                    type: array
                    description: 生成的3D文件列表(仅在task_status=succeed时返回)
                    items:
                      type: object
                      required:
                        - type
                        - url
                      properties:
                        type:
                          type: string
                          description: 3D文件类型
                          enum:
                            - OBJ，GLB，STL，USDZ，FBX，MP4
                        url:
                          type: string
                          description: 3D文件URL
                          format: uri
                        preview_url:
                          type: string
                          description: 3D预览图URL
                          format: uri
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: 提示文本过长
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/StandardError'
components:
  responses:
    ValidationError:
      description: 参数验证错误
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: validation_error
              message:
                type: string
                example: 参数验证失败
              details:
                type: object
                additionalProperties:
                  type: string
                example:
                  field: 错误描述
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: unauthorized
              message:
                type: string
                example: Invalid API key or token
    StandardError:
      description: 标准错误响应
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: 错误代码
          example: invalid_request
        message:
          type: string
          description: 错误信息描述
          example: 请求参数不合法
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API认证token
    apiKeyAuth:
      type: apiKey
      in: header
      name: GeekAI-API-Key
      description: API密钥认证

````