Image model ID. Options: dall-e-3, dall-e-2, black-forest-labs/flux-1.1-pro, black-forest-labs/flux-schnell, stability-ai/sdxl
Text description of the image to generate. Be descriptive — include style, mood, and composition.
Number of images to generate. 1–10. DALL-E 3 only supports n=1.
size
string
default:"1024x1024"
Image dimensions. DALL-E 3 supports: 1024x1024, 1792x1024, 1024x1792.
DALL-E 3 only. standard or hd. HD has finer details and costs ~2×.
DALL-E 3 only. vivid (dramatic, hyper-real) or natural (more subtle, photorealistic).
url returns a temporary URL (valid 1 hour). b64_json returns base64-encoded image data.
curl https://www.samuraiapi.in/v1/images/generations \
-H "Authorization: Bearer $SAMURAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "A samurai warrior standing on Mount Fuji at sunrise, oil painting style, dramatic lighting",
"size": "1792x1024",
"quality": "hd",
"style": "vivid"
}'
{
"created": 1715000000,
"data": [
{
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/...",
"revised_prompt": "A dramatic oil painting of a samurai warrior standing on the snow-capped summit of Mount Fuji at sunrise, with golden light illuminating the scene and cherry blossoms in the foreground."
}
]
}