Qloud Docs

Images and PDFs

Send images and PDF documents to models that accept them.

Images and PDFs go in the content array of a message, next to text parts, in the OpenAI shape.

ModelImagesPDFs
GLM-5.3Not supportedYes
GLM-5.3-FlashYesYes
DeepSeek-V4-ProNot supportedYes
DeepSeek-V4-Flash-0731Not supportedYes
DeepSeek-V4.1-FlashYesYes
Muse-Spark-OpenYesYes

GET /v1/models lists what each model accepts in input_modalities, for example ["text", "image", "pdf"].

Send an image

Send an image_url part with either a base64 data URL or an https link. Qloud downloads linked images itself, so the link must be publicly reachable. detail is passed through.

curl https://api.qloud.sh/v1/chat/completions \
  -H "Authorization: Bearer $QLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "DeepSeek-V4.1-Flash",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this picture?"},
        {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
      ]
    }]
  }'

Send a PDF

Send a file part with the PDF as a base64 data URL in file.file_data. File ids and URLs are not supported.

curl https://api.qloud.sh/v1/chat/completions \
  -H "Authorization: Bearer $QLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "GLM-5.3",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Summarize this report."},
        {"type": "file", "file": {"filename": "report.pdf", "file_data": "data:application/pdf;base64,'"$(base64 < report.pdf | tr -d '\n')"'"}}
      ]
    }]
  }'

A scanned PDF can give little or no text. Send its pages as images.

Types and limits

ImagesPDFs
FormatsPNG, JPEG, WebP, GIFPDF
Sent asBase64 data URL or https linkBase64 data URL in file.file_data
Size8 MB each15 MB each
Per request50 images10 PDFs, 100 pages in total

Max 20 MB per request. Linked images must be on a public https host. Audio and video are not supported.

Billing

Images and PDFs bill as input tokens. If a chat sends the same file again on each turn, each turn is billed.

Errors

See Errors.

On this page