Skip to main content
POST
Generate one image synchronously and return its hosted output URL.

Idempotency

Send a unique Idempotency-Key header for each image you intend to generate. Retrying the same key with the same body replays the original result. When the header is omitted, Genviral derives a stable key from the credential and request body for backward compatibility, so an identical headerless request is treated as a retry rather than a new generation.

Body Parameters

string
required
Image model ID from Get Studio Models.
string
required
Generation prompt.
string[]
Optional input/reference image URLs. Genviral may mirror public reference URLs to its own CDN before handing them to the upstream model so image-edit requests are less sensitive to third-party hotlinking or fetch-policy issues.
object
Normalized image params. Supported keys: aspect_ratio, resolution, output_format, size, max_images, sequential_image_generation, scale_factor.
object
Optional model-specific passthrough params.

Example

Error Responses

  • 400 invalid_json - request body is not valid JSON
  • 401 - authentication failed (missing/invalid/revoked token)
  • 402 subscription_required - active Creator/Professional/Business plan required
  • 403 tier_not_allowed - Scheduler tier cannot use Partner API
  • 403 insufficient_credits
  • 422 invalid_payload (includes unsupported model_id)
  • 422 invalid_input - upstream model rejected the provided prompt/image combination
  • 422 model_requires_image
  • 422 model_input_not_supported
  • 500 generation_failed