Skip to main content
Vision on Piramyd means sending images to a model so it can read, describe, analyse, or reason about the visual content — not generating new images. You attach images to your chat messages as structured content blocks, and the model processes them alongside your text. Piramyd validates vision support before forwarding the request, so you never pay for a round trip to an upstream provider that doesn’t support image input.
Piramyd does not generate images. POST /v1/images/generations does not exist and returns 404. If your pipeline requires image generation, use a dedicated image provider for that step and Piramyd for the text and reasoning parts.

Check Vision Support

Before sending image content, confirm the model you’ve chosen has supports_vision: true in the GET /v1/models response. If you send image content to a model that doesn’t support it, the API returns 400 image_input_not_supported without contacting the upstream provider.

Inline Image URL

Replace the content string in a user message with an array of content blocks. Use type: "text" for the text part and type: "image_url" for the image. The detail field controls how much detail the model examines — "auto" is a sensible default.
The detail field accepts three values:

Pre-Uploading Images

For large images or clients with slow uplinks, embedding a base64-encoded image directly in the request body inflates payload size significantly. Instead, upload the image once to Piramyd’s image storage and pass the returned URL — the upstream AI provider fetches it directly, keeping your request body small.
Uploaded images expire after 1 hour. Upload immediately before the inference call; do not cache the returned URL for later use.

Upload the image

Send a multipart POST /v1/images/upload request with the file in the file field. Accepted formats: image/png, image/jpeg, image/webp, image/gif. Maximum size: 20 MB.
The returned URL is public and unauthenticated — GET /v1/images/{image_id} serves the raw bytes with no API key required, so upstream AI providers can fetch the image directly.

Use the URL in your inference call

Pass the returned URL exactly as you would any other image URL:

Responses Endpoint Vision

The POST /v1/responses endpoint supports vision through type: "input_image" content blocks inside the input array. The responses endpoint preserves multimodal content blocks rather than flattening them to text.
The same model selection and supports_vision check applies — if the chosen model doesn’t support image input, the API returns 400 image_input_not_supported before the request reaches the upstream provider.