Documentation Index
Fetch the complete documentation index at: https://docs.mynth.io/llms.txt
Use this file to discover all available pages before exploring further.
Use POST /image/upload when you want Mynth-hosted URLs for reference, context, or init images.
Upload files
curl https://api.mynth.io/image/upload \
-X POST \
-H "Authorization: Bearer $MYNTH_API_KEY" \
-F "images=@./reference-1.png" \
-F "images=@./reference-2.jpg"
Response:
{
"urls": ["https://cdn.example.com/inputs/...", "https://cdn.example.com/inputs/..."]
}
Supported file types
image/jpeg
image/png
image/webp
Upload limits
- minimum file size: 1 KB
- maximum file size: 10 MB per file
- maximum files per request: 10
Use uploaded URLs in a generation request
const uploadUrls = await uploadImagesSomehow();
const task = await mynth.image.generate({
prompt: "Luxury watch campaign shot with dramatic reflections",
model: "xai/grok-imagine-image",
inputs: [
{
type: "image",
role: "reference",
source: {
type: "url",
url: uploadUrls[0],
},
},
],
});
Mynth supports these structured image input roles:
Use string URLs only for the shorthand form. Use the structured object when the role matters.
Important
Input images are validated against the selected model’s capabilities. If the model does not support inputs, the request fails validation.
Grok Imagine supports up to 3 reference images.