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 hassupports_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 thecontent 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.
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.Upload the image
Send a multipartPOST /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.
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
ThePOST /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.
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.