Skip to main content
POST
/
v1
/
images
/
generations
Image Generation / Editing
curl --request POST \
  --url https://www.anyfast.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "wan2.7-image-pro",
  "prompt": "A flower shop with exquisite windows and a beautiful wooden door",
  "image": "https://example.com/input.jpg",
  "n": 1,
  "size": "2K",
  "enable_sequential": false,
  "thinking_mode": true,
  "watermark": false,
  "seed": 1073741823,
  "response_format": "url"
}
'
{
  "created": 1773803391,
  "data": [
    {
      "url": "https://example.com/generated.png",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required

Model ID. wan2.7-image-pro supports 4K output for text-to-image; wan2.7-image is faster.

Available options:
wan2.7-image-pro,
wan2.7-image
Example:

"wan2.7-image-pro"

prompt
string
required

Text description of the image. Supports Chinese and English. Max 5000 characters.

Example:

"A flower shop with exquisite windows and a beautiful wooden door"

image
string

Input image for editing — URL (HTTP/HTTPS) or Base64 data URI (data:{MIME};base64,{data}). Formats: JPEG, JPG, PNG (no transparency), BMP, WEBP. Max 20 MB per image. Resolution: 240–8000 px per side, aspect ratio 1:8–8:1. Up to 9 images.

Example:

"https://example.com/input.jpg"

n
integer
default:1

Number of images to generate.

  • Sequential mode off (enable_sequential: false): 1–4, default 1.
  • Sequential mode on (enable_sequential: true): 1–12, default 12.
Required range: 1 <= x <= 12
Example:

1

size
string

Output resolution. Two formats (cannot mix):

  • Preset: 1K (1024×1024), 2K (2048×2048, default), 4K (4096×4096, wan2.7-image-pro text-to-image only).
  • Custom pixels: {W}x{H} — total pixels 768×768–4096×4096 (text-to-image) or up to 2048×2048 (other modes), aspect ratio 1:8–8:1.
Example:

"2K"

enable_sequential
boolean
default:false

Enable group image output mode. When true, n represents the maximum number of images; actual count is decided by the model.

thinking_mode
boolean
default:true

Enable thinking mode for enhanced reasoning and higher quality. Only effective for text-to-image (no image input, sequential mode off).

watermark
boolean
default:false

Add a watermark to the generated image.

seed
integer

Random seed for reproducible results. Same seed produces similar outputs, though exact reproduction is not guaranteed.

Required range: 0 <= x <= 2147483647
response_format
enum<string>
default:url

Return a URL or Base64-encoded image.

Available options:
url,
b64_json
Example:

"url"

Response

Image generated successfully

created
integer

Unix timestamp

Example:

1773803391

data
object[]