Skip to content

创建语音 gpt-4o-mini-tts

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/audio/speech:
    post:
      summary: 创建语音 gpt-4o-mini-tts
      deprecated: false
      description: 官方文档:https://platform.openai.com/docs/guides/text-to-speech
      tags:
        - 聊天(Chat)/ChatGpt 接口/ChatGPT音频(Audio)
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 可用的 TTS 模型之一:tts-1 或 tts-1-hd
                input:
                  type: string
                  description: 要生成音频的文本。最大长度为4096个字符。
                voice:
                  type: string
                  description: 生成音频时使用的语音。支持的语音有:alloy、echo、fable、onyx、nova 和 shimmer。
                response_format:
                  type: string
                  description: 默认为 mp3 音频的格式。支持的格式有:mp3、opus、aac 和 flac。
                speed:
                  type: number
                  description: 默认为 1 生成的音频速度。选择0.25到4.0之间的值。1.0是默认值。
              required:
                - model
                - input
                - voice
              x-apifox-orders:
                - model
                - input
                - voice
                - response_format
                - speed
            example:
              model: gpt-4o-mini-tts
              input: The quick brown fox jumped over the lazy dog.
              voice: alloy
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apifox-orders: []
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: 聊天(Chat)/ChatGpt 接口/ChatGPT音频(Audio)
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-232421913-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://www.anyapi.vip
    description: 正式环境
security:
  - bearer: []

AnyAPI — 专业的 AI 接口聚合服务