Skip to main content
POST
https://app.firmware.ai
/
api
/
v1
/
images
/
generations
Image generation
curl --request POST \
  --url https://app.firmware.ai/api/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "n": 123,
  "size": "<string>",
  "quality": "<string>",
  "response_format": "<string>"
}
'
{
  "created": 1709123456,
  "data": [
    {
      "url": "https://...",
      "revised_prompt": "A photorealistic mountain landscape at sunrise with golden light"
    }
  ]
}
Generate images from a text prompt. Supports OpenAI, Google Gemini, and Imagen models.

Authenticate

Use an API key in the Authorization header.
curl https://app.firmware.ai/api/v1/images/generations \
  -H "Authorization: Bearer $FIRMWARE_API_KEY"

Request body

model
string
required
Image generation model ID to use. See available image models for the full list.Examples: dall-e-3, imagen-4, imagen-4-ultra, gemini-3-pro-image-preview
prompt
string
required
Text description of the image to generate.
n
integer
default:"1"
Number of images to generate. Most models support 1.
size
string
default:"1024x1024"
Dimensions of the generated image. Supported sizes vary by model.DALL-E 3: 1024x1024, 1024x1792, 1792x1024
quality
string
default:"standard"
Image quality. Options: standard, hd. Supported on DALL-E 3.
response_format
string
default:"url"
Format of the returned image. Options: url, b64_json.

Response

created
integer
Unix timestamp of when the image was created.
data
array
Array of generated image objects.

Examples

curl https://app.firmware.ai/api/v1/images/generations \
  -H "Authorization: Bearer $FIRMWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A photorealistic mountain landscape at sunrise",
    "size": "1024x1024"
  }'
{
  "created": 1709123456,
  "data": [
    {
      "url": "https://...",
      "revised_prompt": "A photorealistic mountain landscape at sunrise with golden light"
    }
  ]
}