# Speak text (/reference/api/speech/create-speech)

```json
[
  {
    "method": "POST",
    "path": "/api/v1/speech",
    "operationId": "createSpeech",
    "tags": [
      "Speech"
    ],
    "summary": "Speak text",
    "x-required-scope": "audio:generate",
    "security": [
      {
        "oauth": [
          "audio:generate"
        ]
      },
      {
        "sessionCookie": []
      },
      {
        "secureSessionCookie": []
      }
    ],
    "responses": {
      "200": {
        "description": "MP3 audio of the text, made once and stored nowhere.",
        "content": {
          "audio/mpeg": {
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        }
      },
      "429": {
        "description": "Compute admission or usage is limited.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds until retry.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      },
      "503": {
        "description": "COMPUTE_WORKER_REQUIRED or PROVIDER_UNAVAILABLE: speech can't be made right now.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "default": {
        "description": "Request failed. Inspect error.code and error.message.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "requestBody": {
      "required": true,
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SpeechRequest"
          },
          "examples": {
            "speak": {
              "summary": "Speak with saved settings",
              "value": {
                "text": "Hello there."
              }
            }
          }
        }
      }
    },
    "description": "For apps that read short text aloud, such as a chat reply or a podcast line. Uses the saved provider, model, voice and speed unless the request names them. The characters count against compute limits like any synthesis. Nothing is added to the library; split longer text into several requests."
  }
]
```

## Components

```json
{
  "#/components/schemas/Error": {
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryAfterMs": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "code",
          "message"
        ]
      }
    },
    "required": [
      "error"
    ]
  },
  "#/components/schemas/SpeechRequest": {
    "type": "object",
    "properties": {
      "text": {
        "type": "string",
        "minLength": 1,
        "description": "The text to speak. Surrounding whitespace is trimmed first, and the trimmed text must be 1 to 2000 UTF-16 code units (characters outside the Basic Multilingual Plane, such as emoji, count as 2)."
      },
      "provider": {
        "type": "string",
        "maxLength": 200,
        "description": "Shared provider slug. Omit to use the saved provider."
      },
      "model": {
        "type": "string",
        "maxLength": 256,
        "description": "Model ID, at most 256 UTF-16 code units (emoji count as 2). Omit to use the saved model, or the default model of the named provider."
      },
      "voice": {
        "type": "string",
        "maxLength": 512,
        "description": "Voice ID within that provider and model, at most 512 UTF-16 code units. Omit to use the saved voice, or the first voice of the named provider. A named voice must be one the provider lists."
      },
      "modelSpeed": {
        "type": "number",
        "minimum": 0.5,
        "maximum": 3,
        "description": "Speaking rate the model generates at, for models that support one. Omit to use the saved voice speed."
      }
    },
    "required": [
      "text"
    ],
    "additionalProperties": false
  }
}
```