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": "grok-imagine-image",
  "prompt": "Abstract human silhouette, golden particles ready to burst outward representing joy",
  "num_outputs": 1,
  "aspect_ratio": "1:1",
  "output_format": "jpg"
}
'
{
  "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:grok-imagine-image
required

grok-imagine-image: Supports text-to-image and image editing

Example:

"grok-imagine-image"

prompt
string
required

Image generation prompt

Notes:

  • Text-to-image mode: Describe the image content you want to generate
  • Image editing mode: Describe the editing requirements for the input image
Example:

"Abstract human silhouette, golden particles ready to burst outward representing joy"

num_outputs
integer
default:1

Number of output images

Notes:

  • Range: 1 - 4
  • Each image is billed independently
Example:

1

aspect_ratio
string | null

Output image aspect ratio

Options:

  • 2:1, 20:9, 19.5:9, 16:9, 4:3, 3:2, 1:1
  • 2:3, 3:4, 9:16, 9:19.5, 9:20, 1:2

Notes:

  • Only supported in text-to-image mode
  • Defaults to 1:1 upstream when not specified
Example:

"1:1"

output_format
string | null

Output image format

Options:

  • jpg / jpeg
  • png
  • webp

Notes:

  • Defaults to jpeg upstream when not specified

Do not pass this parameter unless necessary.

Example:

"jpg"

image_urls
string[] | null

List of input image URLs

Notes:

  • Automatically switches to image editing mode when provided
  • Supports up to 3 input images
  • Public accessible image URLs are recommended
Example:
["https://example.com/input-image.png"]

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 information

type
enum<string>

Task output type

Available options:
image
Example:

"image"