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

# 转换模型格式

> 将已生成模型转换为目标格式，并返回下载链接。该操作消耗 10 点数。



## OpenAPI

````yaml /openapi.old.zh.json post /api/convertToFormat
openapi: 3.0.3
info:
  title: Neural4D 管理接口
  description: Neural4D 管理接口规范，中文界面下使用本规范展示中文接口说明。
  version: 1.5.4
servers:
  - url: https://alb.neural4d.com:3000
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: text-to-3d
    description: 用于通过文本生成 3D 模型的接口。
    x-group: 文本生成 3D
  - name: image-to-3d
    description: 用于通过图片生成 3D 模型的接口。
    x-group: 图片生成 3D
  - name: model-management
    description: 用于查询模型、跟踪任务和转换格式的接口。
    x-group: 模型管理
  - name: media-generation
    description: 用于生成图片、视频以及查询结果的接口。
    x-group: 图片与视频生成
  - name: account-and-validation
    description: 用于校验输入图片和查询点数余额的接口。
    x-group: 账户与校验
paths:
  /api/convertToFormat:
    post:
      tags:
        - model-management
      summary: 转换模型格式
      description: 将已生成模型转换为目标格式，并返回下载链接。该操作消耗 10 点数。
      operationId: convertToFormat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertToFormatRequest'
            examples:
              default:
                value:
                  uuid: 2dee04d4-f6e5-4fdf-b626-0f814e24db84
                  modelType: fbx
                  modelSize: 2
      responses:
        '200':
          description: 格式转换结果
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertToFormatResponse'
              examples:
                converting:
                  value:
                    statusType: 1
                    modelSize: 2
                    message: >-
                      The specified model format does not exist, converting
                      now...
                completed:
                  value:
                    statusType: 0
                    modelUrl: >-
                      https://s3.neural4d.com/fbx_54078587-7fdd-49c5-9fe6-317d22f27098.zip?sig=example
                    scaleNumber: 4
                    message: >-
                      Format conversion has been completed and is ready for
                      download.
                missingUuid:
                  value:
                    statusType: -1
                    message: >-
                      Model not found for this UUID
                      (0efc2b3-57e1-4813-90c6-419de96e785e). Please check if the
                      UUID is correct.
components:
  schemas:
    ConvertToFormatRequest:
      type: object
      required:
        - uuid
      properties:
        uuid:
          type: string
          description: 需要转换的生成模型 UUID。
        modelType:
          type: string
          enum:
            - fbx
            - glb
            - obj
            - stl
            - blend
            - usdz
          default: glb
          description: 目标模型格式。
        modelSize:
          type: integer
          minimum: 2
          default: 2
          description: 目标模型尺寸，单位为毫米。该值必须大于 1。
    ConvertToFormatResponse:
      type: object
      required:
        - statusType
        - message
      properties:
        statusType:
          type: integer
          enum:
            - -1
            - 0
            - 1
          description: 转换状态。`0` 表示已完成，`1` 表示仍在转换中，`-1` 表示请求无效或转换失败。
        modelUrl:
          type: string
          format: uri
          nullable: true
          description: 转换完成后可用的模型下载链接。
        scaleNumber:
          type: integer
          nullable: true
          description: 转换完成后返回的缩放数值。
        modelSize:
          type: integer
          nullable: true
          description: 请求或中间响应中回显的模型尺寸。
        message:
          type: string
          description: 转换状态消息。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 使用 Neural4D 网站提供的 Bearer token。
      x-default: YOUR_TOKEN

````