> ## Documentation Index
> Fetch the complete documentation index at: https://algorand-54fd52b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Text to speech

> Not available on Robinhood WIF: this deployment is chat-only. This endpoint is retained for legacy documentation and must not be treated as a live WIF product.

Priced per character. Charged before generation and refunded on-chain if the provider fails.



## OpenAPI

````yaml POST /v1/models/{model}/audio/speech
openapi: 3.1.0
info:
  title: Moltworld API
  version: 3.0.0
  description: >-
    Live Robinhood Chain deployment: chat requests are paid per call in WIF
    using x402 exact EVM/Permit2 on `eip155:4663`. Free model discovery and
    quotes are available. WIF is an 18-decimal ERC-20. Image, speech, video,
    marketplace listings and creator payouts, automatic WIF refunds/rebates, and
    autonomous agent mandates are not enabled. A paid chat request receives `402
    Payment Required` and must be retried with a valid EVM `Payment-Signature`;
    the signed challenge is authoritative for amount and recipient.
servers:
  - url: https://moltworldd.vercel.app
    description: Live WIF API
security: []
tags:
  - name: Models
    description: Chat is the only paid modality enabled on the Robinhood WIF deployment.
  - name: Pricing
  - name: Jobs and receipts
    description: >-
      Receipt lookup and signing keys are live. Video jobs are retained for
      legacy deployments only.
  - name: Mandates
    description: >-
      WIF GET lookup verifies a pinned owner-deployed contract. Setup, funding
      and revocation require the owner wallet; legacy Algorand POST routes
      remain unavailable on WIF.
  - name: Marketplace
    description: >-
      When ROBINHOOD_MARKETPLACE_ENABLED=true, approved real APIs support WIF
      checkout, exact creator credits and wallet-authorized verified payouts.
  - name: Service
paths:
  /v1/models/{model}/audio/speech:
    post:
      tags:
        - Models
      summary: Text to speech
      description: >-
        Not available on Robinhood WIF: this deployment is chat-only. This
        endpoint is retained for legacy documentation and must not be treated as
        a live WIF product.


        Priced per character. Charged before generation and refunded on-chain if
        the provider fails.
      parameters:
        - name: model
          in: path
          required: true
          schema:
            type: string
          description: Model slug from `GET /v1/models`, for example `gpt-4o`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpeechRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpeechResponse'
          headers:
            Moltworld-Receipt:
              description: Signed receipt, base64url-encoded JSON. See Receipts.
              schema:
                type: string
            Moltworld-Request-Id:
              description: Request id, used to look up the receipt.
              schema:
                type: string
            Payment-Response:
              description: x402 settlement result (base64 JSON with the transaction id).
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/Unavailable'
      deprecated: true
      security:
        - x402: []
        - {}
components:
  schemas:
    SpeechRequest:
      type: object
      properties:
        input:
          type: string
          description: Text to speak.
        voice:
          type: string
          description: One of the model's `voices`, or an ElevenLabs voice id.
        response_format:
          type: string
          enum:
            - mp3
            - wav
            - opus
            - aac
            - flac
          description: One of the model's `audio_formats`.
        speed:
          type: number
          minimum: 0.25
          maximum: 4
      required:
        - input
    SpeechResponse:
      type: object
      properties:
        object:
          type: string
          const: audio.speech
        model:
          type: string
        format:
          type: string
        mime_type:
          type: string
        audio_b64:
          type: string
          description: Base64 audio.
        character_count:
          type: integer
        moltworld:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      properties:
        request_id:
          type: string
        price_usd_micro:
          type: integer
          description: USD quote in micro-dollars; this is not a WIF token amount.
        payment_asset:
          type: string
          description: Payment asset symbol, WIF on the Robinhood deployment.
        payment_amount_atomic:
          type: string
          pattern: ^[0-9]+$
          description: Exact ERC-20 base-unit amount paid.
        receipt_url:
          type: string
          format: uri
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  responses:
    BadRequest:
      description: Invalid request body. Nothing was charged.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: >-
        Payment required. The `Payment-Required` header holds the x402 terms for
        this exact request. If you sent a payment that was refused, the body
        explains why.
      headers:
        Payment-Required:
          description: >-
            Base64 JSON: `{ x402Version, accepts: [{ scheme, network, amount,
            asset, payTo, extra }] }`
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Unknown model, listing, job or receipt.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests from this IP. See `Retry-After`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UpstreamError:
      description: >-
        The model provider failed. Chat is not charged; image, voice and video
        are refunded on-chain.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: The model or payment verification is unavailable. Nothing was charged.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    x402:
      type: apiKey
      in: header
      name: Payment-Signature
      description: >-
        x402 v2 payment payload encoded for the `Payment-Signature` header. The
        buyer signs the exact Robinhood Chain WIF/Permit2 requirement with an
        EVM wallet or compatible x402 client; do not construct it by hand.

````

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