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

# image-text-to-text

> Chat with AI models using text and images. Also known as image-text-to-text



## OpenAPI

````yaml post /models/v2/google/gemma-3-4b-it
openapi: 3.0.3
info:
  title: Open Source AI Models API – Multimodal
  description: >-
    API for running open-source AI models that take text, vision, audio, and
    video as input.
  version: 1.0.0
servers:
  - url: https://api.bytez.com
    description: Production server
security: []
paths:
  /models/v2/google/gemma-3-4b-it:
    post:
      summary: image-text-to-text
      description: >-
        Chat with AI models using text and images. Also known as
        image-text-to-text
      operationId: image-text-to-text
      requestBody:
        description: Schema for image-text-to-text models
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  type: array
                  description: Conversation history.
                  example:
                    - role: user
                      content:
                        - type: text
                          text: Describe this image
                        - type: image
                          url: >-
                            https://hips.hearstapps.com/hmg-prod/images/how-to-keep-ducks-call-ducks-1615457181.jpg?crop=0.670xw:1.00xh;0.157xw,0&resize=980:*
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - system
                          - user
                          - assistant
                      content:
                        oneOf:
                          - type: string
                          - type: array
                            items:
                              type: object
                              required:
                                - type
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                    - image
                                text:
                                  type: string
                                url:
                                  type: string
                                  format: uri
                                base64:
                                  type: string
                stream:
                  type: boolean
                  description: Enable text streaming.
                params:
                  type: object
                  description: Model-specific parameters.
                  properties:
                    min_length:
                      type: integer
                      description: Minimum length of the generated text.
                      example: 10
                    max_length:
                      type: integer
                      description: Maximum length of the generated text.
                      example: 100
                    temperature:
                      type: number
                      format: float
                      description: >-
                        Sampling temperature. Higher values = more random
                        output.
                      example: 0.5
              required:
                - messages
      responses:
        '200':
          description: Successful image-text-to-text response.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - output
                properties:
                  error:
                    type: string
                    nullable: true
                    description: Null on success; otherwise an error message.
                  output:
                    type: object
                    description: The output message generated by the model
                    example:
                      role: assistant
                      content: Aaaaaaaargh matey
        '401':
          description: Auth error - check your api key and how you're sending it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  output:
                    type: string
                    example: null
        '429':
          description: Too Many Requests – You have hit the rate limit.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Rate limit exceeded
                  output:
                    type: string
                    example: null
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        Set `Authorization` header to `BYTEZ_KEY` 
        ``` 'Authorization: YOUR_BYTEZ_KEY_HERE' ```

````