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

# Create speech

> Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).



## OpenAPI

````yaml /openapi.json post /audio/speech
openapi: 3.1.0
info:
  title: Nemonist API
  version: 1.0.0
  description: >-
    OpenRouter-compatible API with durable per-workspace memory. Point any
    OpenRouter client at https://nemonist.com/api/v1 with a Nemonist key
    (sk-nm-...). Chat completions, Responses and Messages requests from a
    workspace carrying a .nemonist/key get its memory; every other request is
    answered as OpenRouter would.
  contact:
    name: Nemonist
    url: https://nemonist.com
servers:
  - url: https://nemonist.com/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - description: API key management endpoints
    name: API Keys
  - description: Analytics and usage endpoints
    name: Analytics
  - description: Anthropic Messages endpoints
    name: Anthropic Messages
  - description: BYOK endpoints
    name: BYOK
  - description: Benchmarks endpoints
    name: Benchmarks
  - description: Chat completion endpoints
    name: Chat
  - description: Credit management endpoints
    name: Credits
  - description: >-
      Public OpenRouter usage datasets. Data returned by these endpoints is
      licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/):
      reuse and republish it, including commercially, with attribution to
      OpenRouter.
    name: Datasets
  - description: Text embedding endpoints
    name: Embeddings
  - description: Endpoint information
    name: Endpoints
  - name: Folders
    description: >-
      Your memory folders, over your account's API key: read, export, upload,
      and manage keys.
  - description: Generation history endpoints
    name: Generations
  - description: Guardrails endpoints
    name: Guardrails
  - description: Images endpoints
    name: Images
  - name: Memory
    description: Nemonist's per-workspace memory.
  - name: Model runs
    description: Run models (physics and others) on inputs; one contract for every model
  - description: Model information endpoints
    name: Models
  - description: OAuth authentication endpoints
    name: OAuth
  - description: Organization endpoints
    name: Organization
  - description: Private Endpoints endpoints
    name: Private Endpoints
  - description: Provider information endpoints
    name: Providers
  - description: Rerank endpoints
    name: Rerank
  - description: OpenAI-compatible Responses API endpoints
    name: Responses
  - description: Speech-to-text endpoints
    name: STT
    x-displayName: Transcriptions
  - description: >-
      System One endpoints for models such as Jev, compatible with the TypeSafe
      SDKs. See https://openrouter.ai/docs/guides/community/typesafe-sdk.
    name: SystemOne
    x-displayName: System One
  - description: Text-to-speech endpoints
    name: TTS
    x-displayName: Speech
  - description: Video Generation endpoints
    name: Video Generation
  - description: Workspaces endpoints
    name: Workspaces
  - name: beta.responses
    description: >-
      Deprecated alias of responses. Use responses instead; scheduled for
      removal (sunset date TBD).
paths:
  /audio/speech:
    parameters:
      - $ref: '#/components/parameters/AppIdentifier'
      - $ref: '#/components/parameters/AppDisplayName'
      - $ref: '#/components/parameters/AppCategories'
    post:
      tags:
        - TTS
      summary: Create speech
      description: >-
        Synthesizes audio from the input text. Returns a raw audio bytestream in
        the requested format (e.g. mp3, pcm, wav).
      operationId: createAudioSpeech
      requestBody:
        content:
          application/json:
            example:
              input: Hello world
              model: mistralai/voxtral-mini-tts-2603
              response_format: pcm
              speed: 1
              voice: en_paul_neutral
            schema:
              $ref: '#/components/schemas/SpeechRequest'
        required: true
      responses:
        '200':
          content:
            audio/*:
              schema:
                description: >-
                  Raw audio bytestream. Content-Type varies by requested format
                  (audio/mpeg for mp3, audio/pcm for pcm — 16-bit
                  little-endian).
                example: <binary audio data>
                format: binary
                type: string
          description: Audio bytes stream
        '400':
          content:
            application/json:
              example:
                error:
                  code: 400
                  message: Invalid request parameters
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
          description: Bad Request - Invalid request parameters or malformed input
        '401':
          content:
            application/json:
              example:
                error:
                  code: 401
                  message: Missing Authentication header
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
          description: Unauthorized - Authentication required or invalid credentials
        '402':
          content:
            application/json:
              example:
                error:
                  code: 402
                  message: >-
                    Insufficient credits. Add more using
                    https://openrouter.ai/credits
              schema:
                $ref: '#/components/schemas/PaymentRequiredResponse'
          description: >-
            Payment Required - Insufficient credits or quota to complete
            request. Nemonist: over a spending cap, or out of credits.
        '403':
          content:
            application/json:
              example:
                error:
                  code: 403
                  message: Only management keys can perform this operation
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
          description: Forbidden - Authentication successful but insufficient permissions
        '404':
          content:
            application/json:
              example:
                error:
                  code: 404
                  message: Resource not found
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
          description: Not Found - Resource does not exist
        '413':
          content:
            application/json:
              example:
                error:
                  code: 413
                  message: Request payload too large
              schema:
                $ref: '#/components/schemas/PayloadTooLargeResponse'
          description: Payload Too Large - Request payload exceeds size limits
        '429':
          content:
            application/json:
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
          description: >-
            Too Many Requests - Rate limit exceeded. Nemonist: admission limit
            reached; retry after the Retry-After header's seconds.
        '500':
          content:
            application/json:
              example:
                error:
                  code: 500
                  message: Internal Server Error
              schema:
                $ref: '#/components/schemas/InternalServerResponse'
          description: Internal Server Error - Unexpected server error
        '502':
          content:
            application/json:
              example:
                error:
                  code: 502
                  message: Provider returned error
              schema:
                $ref: '#/components/schemas/BadGatewayResponse'
          description: Bad Gateway - Provider/upstream API failure
        '503':
          content:
            application/json:
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
              schema:
                $ref: '#/components/schemas/ServiceUnavailableResponse'
          description: Service Unavailable - Service temporarily unavailable
        '524':
          content:
            application/json:
              example:
                error:
                  code: 524
                  message: Request timed out. Please try again later.
              schema:
                $ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
          description: Infrastructure Timeout - Provider request timed out at edge network
        '529':
          content:
            application/json:
              example:
                error:
                  code: 529
                  message: Provider returned error
              schema:
                $ref: '#/components/schemas/ProviderOverloadedResponse'
          description: Provider Overloaded - Provider is temporarily overloaded
components:
  parameters:
    AppIdentifier:
      name: HTTP-Referer
      in: header
      schema:
        type: string
      description: >
        The app identifier should be your app's URL and is used as the primary
        identifier for rankings.

        This is used to track API usage per application.
    AppDisplayName:
      name: X-OpenRouter-Title
      in: header
      x-speakeasy-name-override: appTitle
      schema:
        type: string
      description: >
        The app display name allows you to customize how your app appears in
        OpenRouter's dashboard.
    AppCategories:
      name: X-OpenRouter-Categories
      in: header
      x-speakeasy-name-override: appCategories
      schema:
        type: string
      description: >
        Comma-separated list of app categories (e.g. "cli-agent,cloud-agent").
        Used for marketplace rankings.
  schemas:
    SpeechRequest:
      description: Text-to-speech request input
      example:
        input: Hello world
        model: mistralai/voxtral-mini-tts-2603
        response_format: pcm
        speed: 1
        voice: en_paul_neutral
      properties:
        input:
          $ref: '#/components/schemas/SpeechInput'
        input_references:
          description: >-
            Reference content for stateless voice cloning or voice design. Audio
            mode: one to three `input_audio` parts, each optionally paired with
            a `text` part carrying its transcript (a single clip accepts its
            transcript before or after it; with multiple clips each transcript
            immediately follows its clip), plus at most one `image_url` part as
            a scene image on providers that condition the cloned voice on its
            setting; only routed to endpoints that support voice cloning (and
            multiple references or image references when those parts are sent).
            Image mode: exactly one `image_url` part; only routed to endpoints
            that support image references. An empty array is treated as no
            reference.
          example:
            - input_audio:
                data: data:audio/wav;base64,UklGRuQXDABXQVZF...
              type: input_audio
            - text: I used to rule the world.
              type: text
          items:
            $ref: '#/components/schemas/SpeechInputReference'
          type: array
        instructions:
          description: >-
            Delivery instructions for the whole request, such as tone, pacing,
            or emotion. Supported by OpenAI gpt-4o-mini-tts, Gemini TTS, and
            Fish Audio models. Ignored by other providers.
          example: Speak in a warm and friendly tone.
          type: string
        model:
          description: TTS model identifier
          example: mistralai/voxtral-mini-tts-2603
          type: string
        provider:
          description: >-
            Provider configuration: data policy routing preferences (`zdr`,
            `data_collection`) and provider-specific passthrough options
          properties:
            data_collection:
              description: >-
                Data collection setting. If no available model provider meets
                the requirement, your request will return an error.

                - allow: (default) allow providers which store user data
                non-transiently and may train on it


                - deny: use only providers which do not collect user data.
              enum:
                - deny
                - allow
                - null
              example: allow
              title: SpeechRequestDataCollection
              type:
                - string
                - 'null'
              x-speakeasy-unknown-values: allow
            options:
              $ref: '#/components/schemas/ProviderOptions'
            zdr:
              description: >-
                Whether to restrict routing to only ZDR (Zero Data Retention)
                endpoints. When true, only endpoints that do not retain prompts
                will be used.
              example: true
              type:
                - boolean
                - 'null'
          type: object
        response_format:
          default: pcm
          description: Audio output format
          enum:
            - mp3
            - pcm
          example: pcm
          type: string
          x-speakeasy-unknown-values: allow
        session_id:
          description: >-
            A unique identifier for grouping related requests (e.g., a
            conversation or agent workflow). Used for observability grouping in
            Broadcast and private logging; never sent to the provider. If
            provided in both the request body and the x-session-id header, the
            body value takes precedence. Maximum of 256 characters.
          example: session-1234
          maxLength: 256
          type: string
        speed:
          description: >-
            Playback speed multiplier. Honored by models that support it (e.g.
            OpenAI TTS). Other providers either ignore it or return a 400 for a
            non-default value when the model has no speed control.
          example: 1
          format: double
          type: number
        trace:
          $ref: '#/components/schemas/TraceConfig'
        user:
          description: >-
            A unique identifier representing your end-user. Forwarded to
            Broadcast and private logging as the end-user id; never sent to the
            provider.
          example: user-1234
          maxLength: 256
          type: string
        voice:
          description: Voice identifier (provider-specific).
          example: en_paul_neutral
          minLength: 1
          type: string
      required:
        - model
        - input
      type: object
    BadRequestResponse:
      description: Bad Request - Invalid request parameters or malformed input
      example:
        error:
          code: 400
          message: Invalid request parameters
      properties:
        error:
          $ref: '#/components/schemas/BadRequestResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    UnauthorizedResponse:
      description: Unauthorized - Authentication required or invalid credentials
      example:
        error:
          code: 401
          message: Missing Authentication header
      properties:
        error:
          $ref: '#/components/schemas/UnauthorizedResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    PaymentRequiredResponse:
      description: Payment Required - Insufficient credits or quota to complete request
      example:
        error:
          code: 402
          message: Insufficient credits. Add more using https://openrouter.ai/credits
      properties:
        error:
          $ref: '#/components/schemas/PaymentRequiredResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    ForbiddenResponse:
      description: Forbidden - Authentication successful but insufficient permissions
      example:
        error:
          code: 403
          message: Only management keys can perform this operation
      properties:
        error:
          $ref: '#/components/schemas/ForbiddenResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    NotFoundResponse:
      description: Not Found - Resource does not exist
      example:
        error:
          code: 404
          message: Resource not found
      properties:
        error:
          $ref: '#/components/schemas/NotFoundResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    PayloadTooLargeResponse:
      description: Payload Too Large - Request payload exceeds size limits
      example:
        error:
          code: 413
          message: Request payload too large
      properties:
        error:
          $ref: '#/components/schemas/PayloadTooLargeResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    TooManyRequestsResponse:
      description: Too Many Requests - Rate limit exceeded
      example:
        error:
          code: 429
          message: Rate limit exceeded
      properties:
        error:
          $ref: '#/components/schemas/TooManyRequestsResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    InternalServerResponse:
      description: Internal Server Error - Unexpected server error
      example:
        error:
          code: 500
          message: Internal Server Error
      properties:
        error:
          $ref: '#/components/schemas/InternalServerResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    BadGatewayResponse:
      description: Bad Gateway - Provider/upstream API failure
      example:
        error:
          code: 502
          message: Provider returned error
      properties:
        error:
          $ref: '#/components/schemas/BadGatewayResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    ServiceUnavailableResponse:
      description: Service Unavailable - Service temporarily unavailable
      example:
        error:
          code: 503
          message: Service temporarily unavailable
      properties:
        error:
          $ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    EdgeNetworkTimeoutResponse:
      description: Infrastructure Timeout - Provider request timed out at edge network
      example:
        error:
          code: 524
          message: Request timed out. Please try again later.
      properties:
        error:
          $ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    ProviderOverloadedResponse:
      description: Provider Overloaded - Provider is temporarily overloaded
      example:
        error:
          code: 529
          message: Provider returned error
      properties:
        error:
          $ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
        openrouter_metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: OpenRouter's routing detail for the failed request.
        user_id:
          type:
            - string
            - 'null'
          description: Id of the user who made the request.
      required:
        - error
      type: object
    SpeechInput:
      anyOf:
        - type: string
        - items:
            $ref: '#/components/schemas/SpeechTurn'
          minItems: 1
          type: array
      description: >-
        Text to synthesize, or a list of turns for multi-speaker input. Each
        turn has its own text, voice, and instructions. Multi-speaker input is
        supported by Gemini TTS models and by Fish Audio models other than S1.
      example: Hello world
    SpeechInputReference:
      description: Reference content part for stateless voice cloning or voice design
      discriminator:
        mapping:
          image_url: '#/components/schemas/SpeechInputReferenceImage'
          input_audio: '#/components/schemas/SpeechInputReferenceAudio'
          text: '#/components/schemas/SpeechInputReferenceText'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/SpeechInputReferenceAudio'
        - $ref: '#/components/schemas/SpeechInputReferenceText'
        - $ref: '#/components/schemas/SpeechInputReferenceImage'
    ProviderOptions:
      description: >-
        Provider-specific options keyed by provider slug. The provider segment
        is case-insensitive; an endpoint tag after `/` must match the endpoint
        slug exactly. Only options for the matched provider are forwarded; the
        rest are ignored. Unrecognized keys are silently dropped.
      example:
        openai:
          max_tokens: 1000
      properties:
        01ai:
          additionalProperties: {}
          type: object
          description: Options sent only to the 01ai provider.
        ai21:
          additionalProperties: {}
          type: object
          description: Options sent only to the ai21 provider.
        aion-labs:
          additionalProperties: {}
          type: object
          description: Options sent only to the aion-labs provider.
        akashml:
          additionalProperties: {}
          type: object
          description: Options sent only to the akashml provider.
        alibaba:
          additionalProperties: {}
          type: object
          description: Options sent only to the alibaba provider.
        amazon-bedrock:
          additionalProperties: {}
          type: object
          description: Options sent only to the amazon-bedrock provider.
        amazon-bedrock/claude-on-aws:
          additionalProperties: {}
          type: object
          description: Options sent only to the amazon-bedrock/claude-on-aws provider.
        amazon-nova:
          additionalProperties: {}
          type: object
          description: Options sent only to the amazon-nova provider.
        ambient:
          additionalProperties: {}
          type: object
          description: Options sent only to the ambient provider.
        antdigital:
          additionalProperties: {}
          type: object
          description: Options sent only to the antdigital provider.
        anthropic:
          additionalProperties: {}
          type: object
          description: Options sent only to the anthropic provider.
        anthropic/2:
          additionalProperties: {}
          type: object
          description: Options sent only to the anthropic/2 provider.
        anyscale:
          additionalProperties: {}
          type: object
          description: Options sent only to the anyscale provider.
        arcee-ai:
          additionalProperties: {}
          type: object
          description: Options sent only to the arcee-ai provider.
        assemblyai:
          additionalProperties: {}
          type: object
          description: Options sent only to the assemblyai provider.
        atlas-cloud:
          additionalProperties: {}
          type: object
          description: Options sent only to the atlas-cloud provider.
        atoma:
          additionalProperties: {}
          type: object
          description: Options sent only to the atoma provider.
        avian:
          additionalProperties: {}
          type: object
          description: Options sent only to the avian provider.
        azure:
          additionalProperties: {}
          type: object
          description: Options sent only to the azure provider.
        baidu:
          additionalProperties: {}
          type: object
          description: Options sent only to the baidu provider.
        baseten:
          additionalProperties: {}
          type: object
          description: Options sent only to the baseten provider.
        black-forest-labs:
          additionalProperties: {}
          type: object
          description: Options sent only to the black-forest-labs provider.
        byteplus:
          additionalProperties: {}
          type: object
          description: Options sent only to the byteplus provider.
        centml:
          additionalProperties: {}
          type: object
          description: Options sent only to the centml provider.
        cerebras:
          additionalProperties: {}
          type: object
          description: Options sent only to the cerebras provider.
        chutes:
          additionalProperties: {}
          type: object
          description: Options sent only to the chutes provider.
        cirrascale:
          additionalProperties: {}
          type: object
          description: Options sent only to the cirrascale provider.
        clarifai:
          additionalProperties: {}
          type: object
          description: Options sent only to the clarifai provider.
        claude-on-aws:
          additionalProperties: {}
          type: object
          description: Options sent only to the claude-on-aws provider.
        cloudflare:
          additionalProperties: {}
          type: object
          description: Options sent only to the cloudflare provider.
        cohere:
          additionalProperties: {}
          type: object
          description: Options sent only to the cohere provider.
        coreweave:
          additionalProperties: {}
          type: object
          description: Options sent only to the coreweave provider.
        cosine:
          additionalProperties: {}
          type: object
          description: Options sent only to the cosine provider.
        crofai:
          additionalProperties: {}
          type: object
          description: Options sent only to the crofai provider.
        crucible:
          additionalProperties: {}
          type: object
          description: Options sent only to the crucible provider.
        crusoe:
          additionalProperties: {}
          type: object
          description: Options sent only to the crusoe provider.
        darkbloom:
          additionalProperties: {}
          type: object
          description: Options sent only to the darkbloom provider.
        databricks:
          additionalProperties: {}
          type: object
          description: Options sent only to the databricks provider.
        decart:
          additionalProperties: {}
          type: object
          description: Options sent only to the decart provider.
        deepgram:
          additionalProperties: {}
          type: object
          description: Options sent only to the deepgram provider.
        deepinfra:
          additionalProperties: {}
          type: object
          description: Options sent only to the deepinfra provider.
        deepseek:
          additionalProperties: {}
          type: object
          description: Options sent only to the deepseek provider.
        dekallm:
          additionalProperties: {}
          type: object
          description: Options sent only to the dekallm provider.
        digitalocean:
          additionalProperties: {}
          type: object
          description: Options sent only to the digitalocean provider.
        elevenlabs:
          additionalProperties: {}
          type: object
          description: Options sent only to the elevenlabs provider.
        enfer:
          additionalProperties: {}
          type: object
          description: Options sent only to the enfer provider.
        fake-provider:
          additionalProperties: {}
          type: object
          description: Options sent only to the fake-provider provider.
        featherless:
          additionalProperties: {}
          type: object
          description: Options sent only to the featherless provider.
        fireworks:
          additionalProperties: {}
          type: object
          description: Options sent only to the fireworks provider.
        fish-audio:
          additionalProperties: {}
          type: object
          description: Options sent only to the fish-audio provider.
        friendli:
          additionalProperties: {}
          type: object
          description: Options sent only to the friendli provider.
        gmicloud:
          additionalProperties: {}
          type: object
          description: Options sent only to the gmicloud provider.
        google-ai-studio:
          additionalProperties: {}
          type: object
          description: Options sent only to the google-ai-studio provider.
        google-vertex:
          additionalProperties: {}
          type: object
          description: Options sent only to the google-vertex provider.
        gopomelo:
          additionalProperties: {}
          type: object
          description: Options sent only to the gopomelo provider.
        groq:
          additionalProperties: {}
          type: object
          description: Options sent only to the groq provider.
        heygen:
          additionalProperties: {}
          type: object
          description: Options sent only to the heygen provider.
        huggingface:
          additionalProperties: {}
          type: object
          description: Options sent only to the huggingface provider.
        hyperbolic:
          additionalProperties: {}
          type: object
          description: Options sent only to the hyperbolic provider.
        hyperbolic-quantized:
          additionalProperties: {}
          type: object
          description: Options sent only to the hyperbolic-quantized provider.
        inception:
          additionalProperties: {}
          type: object
          description: Options sent only to the inception provider.
        inceptron:
          additionalProperties: {}
          type: object
          description: Options sent only to the inceptron provider.
        inferact-vllm:
          additionalProperties: {}
          type: object
          description: Options sent only to the inferact-vllm provider.
        inference-net:
          additionalProperties: {}
          type: object
          description: Options sent only to the inference-net provider.
        infermatic:
          additionalProperties: {}
          type: object
          description: Options sent only to the infermatic provider.
        inflection:
          additionalProperties: {}
          type: object
          description: Options sent only to the inflection provider.
        inocloud:
          additionalProperties: {}
          type: object
          description: Options sent only to the inocloud provider.
        io-net:
          additionalProperties: {}
          type: object
          description: Options sent only to the io-net provider.
        ionstream:
          additionalProperties: {}
          type: object
          description: Options sent only to the ionstream provider.
        klusterai:
          additionalProperties: {}
          type: object
          description: Options sent only to the klusterai provider.
        krea:
          additionalProperties: {}
          type: object
          description: Options sent only to the krea provider.
        kt:
          additionalProperties: {}
          type: object
          description: Options sent only to the kt provider.
        lambda:
          additionalProperties: {}
          type: object
          description: Options sent only to the lambda provider.
        lepton:
          additionalProperties: {}
          type: object
          description: Options sent only to the lepton provider.
        liquid:
          additionalProperties: {}
          type: object
          description: Options sent only to the liquid provider.
        lynn:
          additionalProperties: {}
          type: object
          description: Options sent only to the lynn provider.
        lynn-private:
          additionalProperties: {}
          type: object
          description: Options sent only to the lynn-private provider.
        makora:
          additionalProperties: {}
          type: object
          description: Options sent only to the makora provider.
        mancer:
          additionalProperties: {}
          type: object
          description: Options sent only to the mancer provider.
        mancer-old:
          additionalProperties: {}
          type: object
          description: Options sent only to the mancer-old provider.
        mara:
          additionalProperties: {}
          type: object
          description: Options sent only to the mara provider.
        meta:
          additionalProperties: {}
          type: object
          description: Options sent only to the meta provider.
        minimax:
          additionalProperties: {}
          type: object
          description: Options sent only to the minimax provider.
        mistral:
          additionalProperties: {}
          type: object
          description: Options sent only to the mistral provider.
        modal:
          additionalProperties: {}
          type: object
          description: Options sent only to the modal provider.
        modelrun:
          additionalProperties: {}
          type: object
          description: Options sent only to the modelrun provider.
        modular:
          additionalProperties: {}
          type: object
          description: Options sent only to the modular provider.
        moonshotai:
          additionalProperties: {}
          type: object
          description: Options sent only to the moonshotai provider.
        morph:
          additionalProperties: {}
          type: object
          description: Options sent only to the morph provider.
        ncompass:
          additionalProperties: {}
          type: object
          description: Options sent only to the ncompass provider.
        near-ai:
          additionalProperties: {}
          type: object
          description: Options sent only to the near-ai provider.
        nebius:
          additionalProperties: {}
          type: object
          description: Options sent only to the nebius provider.
        nex-agi:
          additionalProperties: {}
          type: object
          description: Options sent only to the nex-agi provider.
        nextbit:
          additionalProperties: {}
          type: object
          description: Options sent only to the nextbit provider.
        nineteen:
          additionalProperties: {}
          type: object
          description: Options sent only to the nineteen provider.
        novita:
          additionalProperties: {}
          type: object
          description: Options sent only to the novita provider.
        nvidia:
          additionalProperties: {}
          type: object
          description: Options sent only to the nvidia provider.
        octoai:
          additionalProperties: {}
          type: object
          description: Options sent only to the octoai provider.
        ollama:
          additionalProperties: {}
          type: object
          description: Options sent only to the ollama provider.
        open-inference:
          additionalProperties: {}
          type: object
          description: Options sent only to the open-inference provider.
        openai:
          additionalProperties: {}
          type: object
          description: Options sent only to the openai provider.
        parallel:
          additionalProperties: {}
          type: object
          description: Options sent only to the parallel provider.
        parasail:
          additionalProperties: {}
          type: object
          description: Options sent only to the parasail provider.
        pareto-alpha:
          additionalProperties: {}
          type: object
          description: Options sent only to the pareto-alpha provider.
        particle-ai:
          additionalProperties: {}
          type: object
          description: Options sent only to the particle-ai provider.
        pearl-research:
          additionalProperties: {}
          type: object
          description: Options sent only to the pearl-research provider.
        perceptron:
          additionalProperties: {}
          type: object
          description: Options sent only to the perceptron provider.
        perplexity:
          additionalProperties: {}
          type: object
          description: Options sent only to the perplexity provider.
        phala:
          additionalProperties: {}
          type: object
          description: Options sent only to the phala provider.
        poolside:
          additionalProperties: {}
          type: object
          description: Options sent only to the poolside provider.
        primalabs:
          additionalProperties: {}
          type: object
          description: Options sent only to the primalabs provider.
        primeintellect:
          additionalProperties: {}
          type: object
          description: Options sent only to the primeintellect provider.
        quiver:
          additionalProperties: {}
          type: object
          description: Options sent only to the quiver provider.
        recraft:
          additionalProperties: {}
          type: object
          description: Options sent only to the recraft provider.
        recursal:
          additionalProperties: {}
          type: object
          description: Options sent only to the recursal provider.
        recursive:
          additionalProperties: {}
          type: object
          description: Options sent only to the recursive provider.
        reflection:
          additionalProperties: {}
          type: object
          description: Options sent only to the reflection provider.
        reka:
          additionalProperties: {}
          type: object
          description: Options sent only to the reka provider.
        relace:
          additionalProperties: {}
          type: object
          description: Options sent only to the relace provider.
        replicate:
          additionalProperties: {}
          type: object
          description: Options sent only to the replicate provider.
        respan:
          additionalProperties: {}
          type: object
          description: Options sent only to the respan provider.
        runway:
          additionalProperties: {}
          type: object
          description: Options sent only to the runway provider.
        sail-research:
          additionalProperties: {}
          type: object
          description: Options sent only to the sail-research provider.
        sakana:
          additionalProperties: {}
          type: object
          description: Options sent only to the sakana provider.
        sakana-ai:
          additionalProperties: {}
          type: object
          description: Options sent only to the sakana-ai provider.
        sambanova:
          additionalProperties: {}
          type: object
          description: Options sent only to the sambanova provider.
        sambanova-cloaked:
          additionalProperties: {}
          type: object
          description: Options sent only to the sambanova-cloaked provider.
        scaledown:
          additionalProperties: {}
          type: object
          description: Options sent only to the scaledown provider.
        seed:
          additionalProperties: {}
          type: object
          description: Options sent only to the seed provider.
        sf-compute:
          additionalProperties: {}
          type: object
          description: Options sent only to the sf-compute provider.
        siliconflow:
          additionalProperties: {}
          type: object
          description: Options sent only to the siliconflow provider.
        sourceful:
          additionalProperties: {}
          type: object
          description: Options sent only to the sourceful provider.
        stealth:
          additionalProperties: {}
          type: object
          description: Options sent only to the stealth provider.
        stepfun:
          additionalProperties: {}
          type: object
          description: Options sent only to the stepfun provider.
        streamlake:
          additionalProperties: {}
          type: object
          description: Options sent only to the streamlake provider.
        switchpoint:
          additionalProperties: {}
          type: object
          description: Options sent only to the switchpoint provider.
        targon:
          additionalProperties: {}
          type: object
          description: Options sent only to the targon provider.
        tencent:
          additionalProperties: {}
          type: object
          description: Options sent only to the tencent provider.
        tenstorrent:
          additionalProperties: {}
          type: object
          description: Options sent only to the tenstorrent provider.
        thinkingmachines:
          additionalProperties: {}
          type: object
          description: Options sent only to the thinkingmachines provider.
        together:
          additionalProperties: {}
          type: object
          description: Options sent only to the together provider.
        together-lite:
          additionalProperties: {}
          type: object
          description: Options sent only to the together-lite provider.
        typesafe:
          additionalProperties: {}
          type: object
          description: Options sent only to the typesafe provider.
        ubicloud:
          additionalProperties: {}
          type: object
          description: Options sent only to the ubicloud provider.
        unbiased:
          additionalProperties: {}
          type: object
          description: Options sent only to the unbiased provider.
        upstage:
          additionalProperties: {}
          type: object
          description: Options sent only to the upstage provider.
        venice:
          additionalProperties: {}
          type: object
          description: Options sent only to the venice provider.
        voyageai:
          additionalProperties: {}
          type: object
          description: Options sent only to the voyageai provider.
        wafer:
          additionalProperties: {}
          type: object
          description: Options sent only to the wafer provider.
        wandb:
          additionalProperties: {}
          type: object
          description: Options sent only to the wandb provider.
        wandb-legacy:
          additionalProperties: {}
          type: object
          description: Options sent only to the wandb-legacy provider.
        xai:
          additionalProperties: {}
          type: object
          description: Options sent only to the xai provider.
        xiaomi:
          additionalProperties: {}
          type: object
          description: Options sent only to the xiaomi provider.
        z-ai:
          additionalProperties: {}
          type: object
          description: Options sent only to the z-ai provider.
      type: object
    TraceConfig:
      additionalProperties: {}
      description: >-
        Metadata for observability and tracing. Known keys (trace_id,
        trace_name, span_name, generation_name, parent_span_id) have special
        handling. Additional keys are passed through as custom metadata to
        configured broadcast destinations.
      example:
        trace_id: trace-abc123
        trace_name: my-app-trace
      properties:
        generation_name:
          type: string
          description: Name of this generation in your traces.
        parent_span_id:
          type: string
          description: Span this generation nests under in your traces.
        span_name:
          type: string
          description: Name of this span in your traces.
        trace_id:
          type: string
          description: Id of the trace this request belongs to.
        trace_name:
          type: string
          description: Name of the trace in your traces.
      type: object
    BadRequestResponseErrorData:
      description: Error data for BadRequestResponse
      example:
        code: 400
        message: Invalid request parameters
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 400.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    UnauthorizedResponseErrorData:
      description: Error data for UnauthorizedResponse
      example:
        code: 401
        message: Missing Authentication header
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 401.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    PaymentRequiredResponseErrorData:
      description: Error data for PaymentRequiredResponse
      example:
        code: 402
        message: Insufficient credits. Add more using https://openrouter.ai/credits
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 402.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    ForbiddenResponseErrorData:
      description: Error data for ForbiddenResponse
      example:
        code: 403
        message: Only management keys can perform this operation
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 403.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    NotFoundResponseErrorData:
      description: Error data for NotFoundResponse
      example:
        code: 404
        message: Resource not found
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 404.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    PayloadTooLargeResponseErrorData:
      description: Error data for PayloadTooLargeResponse
      example:
        code: 413
        message: Request payload too large
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 413.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    TooManyRequestsResponseErrorData:
      description: Error data for TooManyRequestsResponse
      example:
        code: 429
        message: Rate limit exceeded
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 429.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    InternalServerResponseErrorData:
      description: Error data for InternalServerResponse
      example:
        code: 500
        message: Internal Server Error
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 500.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    BadGatewayResponseErrorData:
      description: Error data for BadGatewayResponse
      example:
        code: 502
        message: Provider returned error
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 502.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    ServiceUnavailableResponseErrorData:
      description: Error data for ServiceUnavailableResponse
      example:
        code: 503
        message: Service temporarily unavailable
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 503.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    EdgeNetworkTimeoutResponseErrorData:
      description: Error data for EdgeNetworkTimeoutResponse
      example:
        code: 524
        message: Request timed out. Please try again later.
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 524.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    ProviderOverloadedResponseErrorData:
      description: Error data for ProviderOverloadedResponse
      example:
        code: 529
        message: Provider returned error
      properties:
        code:
          type: integer
          description: 'HTTP status of the error, the same as the response''s: 529.'
        message:
          type: string
          description: >-
            What went wrong, in words for a person; do not parse it, branch on
            code instead.
        metadata:
          additionalProperties: {}
          type:
            - object
            - 'null'
          description: Extra detail about the error.
      required:
        - code
        - message
      type: object
    SpeechTurn:
      properties:
        instructions:
          description: >-
            Delivery instructions for this turn, such as tone, pacing, or
            emotion. Overrides the top-level `instructions`.
          example: whispering
          type: string
        text:
          description: Text to synthesize
          example: Hi Jane.
          type: string
        voice:
          description: Voice for this turn. Defaults to the top-level `voice`.
          example: Kore
          minLength: 1
          type: string
      required:
        - text
      type: object
    SpeechInputReferenceImage:
      description: >-
        Reference image. On its own it describes the desired voice (voice
        design); alongside an `input_audio` part it is a scene image describing
        the setting the cloned voice speaks in. At most one per request. Only
        routed to endpoints that support image references.
      example:
        image_url:
          url: data:image/png;base64,iVBORw0KGgo...
        type: image_url
      properties:
        image_url:
          $ref: '#/components/schemas/SpeechInputReferenceImageInput'
        type:
          enum:
            - image_url
          type: string
          description: One of "image_url".
      required:
        - type
        - image_url
      type: object
    SpeechInputReferenceAudio:
      description: >-
        Reference audio input for stateless voice cloning. Up to three parts per
        request; the Nth audio part is addressable from `input` as `@AudioN` on
        providers that support multiple references.
      example:
        input_audio:
          data: data:audio/wav;base64,UklGRuQXDABXQVZF...
        type: input_audio
      properties:
        input_audio:
          $ref: '#/components/schemas/SpeechInputReferenceAudioInput'
        type:
          enum:
            - input_audio
          type: string
          description: One of "input_audio".
      required:
        - type
        - input_audio
      type: object
    SpeechInputReferenceText:
      description: Transcript of an `input_audio` part
      example:
        text: I used to rule the world.
        type: text
      properties:
        text:
          description: >-
            Transcript of an `input_audio` part. With a single clip it may
            appear before or after the clip; with multiple clips it must
            immediately follow the clip it transcribes.
          example: I used to rule the world.
          maxLength: 10000
          type: string
        type:
          enum:
            - text
          type: string
          description: One of "text".
      required:
        - type
        - text
      type: object
    SpeechInputReferenceImageInput:
      description: Reference image input object
      properties:
        url:
          description: >-
            JPEG, PNG, or WebP reference image as a base64 data URI or a public
            http(s) URL. Remote images are downloaded (15 MiB max) and forwarded
            as bytes, never as the URL.
          example: data:image/png;base64,iVBORw0KGgo...
          maxLength: 20971520
          minLength: 1
          type: string
      required:
        - url
      type: object
    SpeechInputReferenceAudioInput:
      description: Reference audio input object
      properties:
        data:
          description: >-
            Base64-encoded reference audio (optionally a data URI). Supported
            audio formats are provider-specific. Limited to 20 MiB of base64 (15
            MiB of decoded audio). Exactly one of `data` or `url` is required.
          example: data:audio/wav;base64,UklGRuQXDABXQVZF...
          maxLength: 20971520
          minLength: 1
          type: string
        format:
          description: >-
            Audio format of the reference audio (e.g., wav, mp3). Optional; most
            providers detect the format from the audio bytes.
          example: wav
          type: string
        url:
          description: >-
            Public http(s) URL of the reference audio. OpenRouter downloads it
            (15 MiB max) and forwards the bytes, never the URL. Exactly one of
            `data` or `url` is required.
          example: https://example.com/reference.wav
          format: uri
          maxLength: 2048
          type: string
      type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Nemonist key (sk-nm-...) as a bearer token in the Authorization
        header.

````

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