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

# Generate images

> 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 image. Charged before generation and refunded on-chain if the provider fails.



## OpenAPI

````yaml POST /v1/models/{model}/images/generations
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}/images/generations:
    post:
      tags:
        - Models
      summary: Generate images
      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 image. 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/ImageRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageResponse'
          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:
    ImageRequest:
      type: object
      properties:
        prompt:
          type: string
        'n':
          type: integer
          minimum: 1
          description: >-
            Images to generate. Most models allow 1; some allow up to 4 (see the
            model's limits).
        size:
          type: string
          example: 1024x1024
          description: One of the model's `sizes`.
      required:
        - prompt
    ImageResponse:
      type: object
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              b64_json:
                type: string
              revised_prompt:
                type: string
        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.