Skip to main content
POST
/
v1
/
images
/
generations
curl --request POST \
  --url https://api.foxapi.cc/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "wan-2.7-image",
  "prompt": "A cinematic portrait of a traveler in neon rain",
  "num_outputs": 1,
  "image_size": "portrait_4_3"
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "image.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "image"
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

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

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
default:wan-2.7-image
required

wan-2.7-image: Standard, supports text-to-image and image editing wan-2.7-image-pro: Pro, supports text-to-image and image editing

Examples:

"wan-2.7-image"

"wan-2.7-image-pro"

prompt
string
required

Image generation or editing prompt

Notes:

  • Text-to-image mode: describe the desired image content
  • Image editing mode: describe the edit instructions for the reference image(s)
  • Supports both Chinese and English
  • Maximum 2000 characters
Maximum string length: 2000
Example:

"A cinematic portrait of a traveler in neon rain"

image_urls
string[] | null

List of reference image URLs

Notes:

  • Automatically switches to image editing mode when provided
  • Supports 1-4 publicly accessible image URLs
  • For multi-image editing, reference them in the prompt as image 1, image 2, etc.
Example:
["https://example.com/photo.jpg"]
num_outputs
integer
default:1

Number of output images

Notes:

  • Text-to-image mode: supports 1-5
  • Image editing mode: supports 1-4
Required range: 1 <= x <= 5
Example:

1

image_size
default:square_hd

Output image size

Options:

  • Preset: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9
  • Explicit dimension object: {width, height}
Available options:
square_hd,
square,
portrait_4_3,
portrait_16_9,
landscape_4_3,
landscape_16_9
Example:

"square_hd"

negative_prompt
string
default:""

Negative prompt describing content to avoid

Maximum string length: 500
Example:

"blurry, low quality"

seed
integer | null

Random seed for reproducibility

Required range: 0 <= x <= 2147483647
Example:

42

enable_safety_checker
boolean | null

Whether to enable safety checker

Notes:

  • Controls content safety review for both input and output
  • Uses model default if not specified

Do not pass this parameter unless necessary.

Example:

true

enable_prompt_expansion
boolean | null

Whether to enable prompt expansion

Notes:

  • Only available in image editing mode
  • Uses model default if not specified

Do not pass this parameter unless necessary.

Example:

true

Response

Task created successfully

created
integer

Task creation timestamp

Example:

1757165031

id
string

Task ID

Example:

"task-unified-1757165031-uyujaw3d"

model
string

Actual model name used

object
enum<string>

Specific task type

Available options:
image.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

task_info
object

Asynchronous task info

type
enum<string>

Task output type

Available options:
image
Example:

"image"