Skip to content
Appmake
Kalle API docs

Files and images

Kalle can read what people see: screenshots, photos of a whiteboard, PDFs and documents. Send them as blocks in a message, next to your text.

curl https://api.kalle.build/v1/messages \
  -H "Authorization: Bearer $KALLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kalle-design",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image",
            "source": { "type": "url", "url": "https://example.com/landing-page.png" }
          },
          {
            "type": "text",
            "text": "Suggest three changes that would make this page easier to scan."
          }
        ]
      }
    ]
  }'

Images

Add an image block to the content of a user message. Kalle Design is the best fit for screenshots of interfaces, layouts and brand material, and every model can read images.

Supported formats are PNG, JPEG, WebP and GIF. For a GIF, Kalle reads the first frame.

Documents

Add a document block for PDFs and text files. Kalle reads the text and, for PDFs, the pages as images too, so tables, charts and scanned pages work.

JSON
{
  "type": "document",
  "source": { "type": "url", "url": "https://example.com/annual-report.pdf" },
  "title": "Annual report 2026"
}

Supported formats are PDF, plain text, Markdown and CSV.

Sources

Every image and document has a source. Use a URL when the file is public, and base64 when it is not.

source.typeFieldsUse it when
urlurlThe file is reachable over HTTPS without signing in.
base64media_type, dataThe file is private or lives on your server.
JSON
{
  "type": "image",
  "source": {
    "type": "base64",
    "media_type": "image/png",
    "data": "iVBORw0KGgoAAAANSUhEUgAA..."
  }
}

What files cost

Images and documents are counted as input tokens, like text. A larger image or a longer document costs more. usage.input_tokens in the response includes them, so you always see the real cost of a request.

Tips

  • Put the files before your question in the same message. Kalle reads in order.
  • Crop screenshots to what matters. Less noise gives sharper answers and costs fewer tokens.
  • Tell Kalle what the file is: "This is our current pricing page" helps more than you think.