Reference/custom media

Generate Image

Generate Image Project API key. Request examples use snake_case; schemas may also display accepted camelCase aliases. Replace resource placeholders with accessible IDs. See the guides for runtime model constraints and workflows. These prepared-media routes accept their own worker input fields. Image input uses prompt and optional width/height; video uses prompt, exactly one input_image_url or input_image_base64, and duration_seconds. Replace the illustrative source URL with your actual HTTPS media source. Poll the returned statusUrl. Replace UNIQUE_IDEMPOTENCY_KEY with a unique key for each logical request; reuse it only when retrying the identical payload.

POST/v1/generate-image
Open playground
Project API key. See authentication.

Authorizations

Project API key.

Idempotency-Keystringrequired

Body (application/json)

modelAliasstringoptionaldefault: photoreal-v1
clientRequestIdstringoptional
inputobjectrequired

Response

202 - application/json
Successful Response
No detailed response model is declared for this operation. See its guide for response fields and lifecycle behavior.
Request Example
curl --fail-with-body -X POST "https://api.apimarketplace.com/v1/generate-image" -H "Authorization: Bearer $API_KEY" -H 'Content-Type: application/json' --data '{"modelAlias": "photoreal-v1", "input": {"prompt": "Architectural photography of a modern apartment", "width": 1024, "height": 1024}}' -H "Idempotency-Key: UNIQUE_IDEMPOTENCY_KEY"