Skip to main content
POST
Generate AI image

Description

This endpoint generates high-quality AI images using various models with different capabilities and price points. It supports multiple models with customizable parameters for each.

Endpoint

Headers

  • Content-Type: application/json
  • Authorization: Bearer <API_KEY> (required)

Request Body

Supported Models and Their Parameters

FLUX.1-schnell (30 credits per image)

FLUX.1-dev (150 credits per image)

FLUX.1-pro and FLUX.1.1-pro (300 credits per image)

FLUX.1-kontext-pro (200 credits per image)

recraft-v3 (200 credits per image)

Available size options:
  • “1024x1024”
  • “1365x1024”
  • “1024x1365”
  • “1536x1024”
  • “1024x1536”
  • “1820x1024”
  • “1024x1820”
  • “1024x2048”
  • “2048x1024”
  • “1434x1024”
  • “1024x1434”
  • “1024x1280”
  • “1280x1024”
  • “1024x1707”
  • “1707x1024”
Available style options:
  • “any”
  • “realistic_image”
  • “digital_illustration”
  • “digital_illustration/pixel_art”
  • “digital_illustration/hand_drawn”
  • “digital_illustration/grain”
  • “digital_illustration/infantile_sketch”
  • “digital_illustration/2d_art_poster”
  • “digital_illustration/handmade_3d”
  • “digital_illustration/hand_drawn_outline”
  • “digital_illustration/engraving_color”
  • “digital_illustration/2d_art_poster_2”
  • “realistic_image/b_and_w”
  • “realistic_image/hard_flash”
  • “realistic_image/hdr”
  • “realistic_image/natural_light”
  • “realistic_image/studio_portrait”
  • “realistic_image/enterprise”
  • “realistic_image/motion_blur”

Responses

Success (200)

Returns the generated image URLs and usage information.
  • Content-Type: application/json
  • X-RateLimit-Limit: The rate limit for the user.
  • X-RateLimit-Remaining: The remaining number of requests for the user.

Bad Request (400)

Returned if the request is invalid.

Internal Server Error (500)

Returned if there’s an error during the image generation process.

Example Requests

Text-to-Image Generation

Image Editing with FLUX.1-kontext-pro

Notes

  • Credit costs per image vary by model:
    • FLUX.1-schnell: 30 credits
    • FLUX.1-dev: 150 credits
    • FLUX.1-pro: 300 credits
    • FLUX.1.1-pro: 500 credits
    • FLUX.1-kontext-pro: 200 credits
    • recraft-v3: 200 credits
  • Total credit usage is calculated as: model cost × number of images generated
  • Generated images are temporarily stored and accessible via the returned URLs
  • Safety checks are enabled by default to prevent NSFW content generation

Rate Limiting

Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters used to generate AI images through DumplingAI providers.

model
enum<string>
required

Identifier of the image model to run.

Available options:
FLUX.1-schnell,
FLUX.1-dev,
FLUX.1-pro,
FLUX.1.1-pro,
FLUX.1-kontext-pro,
recraft-v3
input
object
required

Model-specific parameters for AI image generation. Fields vary by selected model.

permanent
boolean

When true, request permanent storage of generated assets.

requestSource
enum<string>

Optional identifier describing where the API request originated.

Available options:
API,
WEB,
MAKE_DOT_COM,
ZAPIER,
N8N,
PLAYGROUND,
DEFAULT_AUTOMATION,
AGENT_PREVIEW,
AGENT_LIVE,
AUTOPILOT,
STUDIO

Response

Image generation task accepted.

images
object[]
required
prompt
string
required
creditUsage
integer
required
model
string
required