v1

latestOpenAPI 3.0.32026-07-26451985.7 KB

image-text-to-text

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

post/models/v2/google/gemma-3-4b-it

Request body

streamboolean

Enable text streaming.

Example request

{
  "messages": [
    {
      "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:*"
        }
      ]
    }
  ],
  "params": {
    "min_length": 10,
    "max_length": 100,
    "temperature": 0.5
  }
}

Response

Successful image-text-to-text response.

errorstring nullable required

Null on success; otherwise an error message.

outputobject required

The output message generated by the model

Example response

{
  "output": {
    "role": "assistant",
    "content": "Aaaaaaaargh matey"
  }
}