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

# Convert images to text



## OpenAPI

````yaml /api-reference/openapi.json post /v1/images/to-text
openapi: 3.1.0
info:
  title: SynapsAI Inference API
  version: 1.0.0
servers:
  - url: https://api.synapsai.cloud
    description: Production server
security: []
paths:
  /v1/images/to-text:
    post:
      summary: Convert images to text
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageToTextRequest'
      responses:
        '200':
          description: Generated text descriptions
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    generated_text:
                      type: string
components:
  schemas:
    ImageToTextRequest:
      allOf:
        - type: object
          description: Request to generate textual descriptions/captions for images.
          properties:
            inputs:
              oneOf:
                - type: string
                - type: array
                  items: {}
                - type: string
                  format: binary
              description: Image(s) to caption (URL, base64, or binary). Required.
            max_new_tokens:
              type: integer
              default: 512
              description: Maximum number of tokens to generate for each caption.
            generate_kwargs:
              type: object
              additionalProperties: true
              nullable: true
              description: >-
                Optional extra generation arguments to control
                sampling/decoding.
            timeout:
              type: number
              nullable: true
              description: Maximum time in seconds to wait for processing or fetching.
          required:
            - inputs

````