Skip to navigation

Generate SVG

Generates SVG artwork from a prompt and optional image references.

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Query parameters

dry_runbooleanOptionalDefaults to false

When true, the request is validated and priced but not run: nothing is generated, stored, or billed, and no safety review is performed. The response is a PriceQuote object instead of the usual response for this endpoint. Send exactly the request you would send to generate, so the quote reflects the same options.

Request

This endpoint expects a multipart form with multiple files.
promptstringRequired1-9500 characters
image_asset_identifierslist of objectsOptional

Existing uploaded or generated image references. Takes priority over images when both are supplied. The first image is the primary source; any others are additional references.

imagesfilesOptional

Source images to transform, supplied as multipart file uploads. The first image is the primary source; any others are additional references.

aspect_ratioenumOptionalDefaults to auto

Supported output aspect ratios. The operation defines whether auto preserves the source shape or selects a shape from the prompt.

qualityenumOptionalDefaults to medium
Allowed values:
num_imagesintegerOptional1-8Defaults to 1
seedintegerOptional0-2147483647
privatebooleanOptional
Outputs are private by default. Enterprise outputs are always private.
target_collection_idstringOptional

URL-safe base64 ID of a writable destination collection.

webhook_urlstringOptionalformat: "uri"<=2048 characters

HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a JSON POST to this URL once all images for the request have finished generating. The body mirrors the synchronous generate response: request_id, created, and a data array containing every generated image (url, prompt, resolution, seed, is_image_safe). Each delivery is signed with Ed25519 and verifiable against the public keys at https://api.ideogram.ai/v1/.well-known/jwks.json. Must be HTTPS; private and loopback hosts and the cloud metadata service are rejected.

Response

Generation accepted. Dry runs return a PriceQuote.
generation_idstring

URL-safe base64 generation ID. Poll the shared generations endpoint for SVG results.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
503
Service Unavailable Error