> ## 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.

# 创建音色

用于创建自定义音色，创建自定义音色可用于视频生成场景，目前仅可灵支持。


## OpenAPI

````yaml openapi.yaml POST /voices/create
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:
  /voices/create:
    post:
      tags:
        - CreateVoices
      summary: 创建自定义音色
      description: 创建自定义音色，用于视频生成场景。
      operationId: createVoices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - name
                - url
              properties:
                name:
                  type: string
                  description: 音色名称
                  example: test-voice
                model:
                  type: string
                  description: 模型ID
                  example: kling-voice-v1
                url:
                  type: string
                  format: uri
                  description: 音色文件URL
                video_id:
                  type: string
                  description: 历史视频ID（必须是可灵生成的视频），和音色文件URL只能二选一
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                required:
                  - task_id
                properties:
                  task_id:
                    type: string
                    description: 任务ID
                  task_status:
                    type: string
                    description: 任务状态
                    enum:
                      - pending
                      - running
                      - succeed
                      - failed
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '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密钥认证

````

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