Integrate with our API

Generate and manage your API keys to bring the power of Ghostbot Web into your own applications and services.

API Keys

Your secret API keys are listed below. They are stored in your browser.

KeyCreatedActions
No API keys yet.

GhostAPI Documentation

OpenAI-compatible API for image generation. Version 1.0.0

Interactive API Docs

Base URL

https://api.infip.pro

Authentication

All API requests require Bearer token authentication. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
GET

/generate-api-key

Generate or retrieve an API key. Optionally binds the key to a specific IP address.

GET

/v1/models

Retrieve a list of all available image generation models with their capabilities.

POST

/v1/images/generations

Generate images from a text prompt using any available model.

Request Body (JSON)

ParameterTypeRequiredDescription
promptstring
Required
A text description of the desired image(s).
modelstring
Optional
The model to use. Default: img3
Options: z-image-turbo, nbpro, img3, img4, qwen, nano-banana, flux-schnell, lucid-origin, phoenix, sdxl, sdxl-lite
ninteger
Optional
Number of images to generate. Default: 1, Max: 4
sizestring
Optional
Image dimensions. Default: 1024x1024
Options: 1024x1024, 1792x1024, 1024x1792
response_formatstring
Optional
Output format. Default: url
Options: url, b64 (base64 encoded)

Example Request

curl -X POST https://api.infip.pro/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "img4",
    "prompt": "A vibrant oil painting of a futuristic cityscape at sunset",
    "n": 2,
    "size": "1792x1024",
    "response_format": "url"
  }'

Example Response

{
  "created": 1734531234,
  "data": [
    {
      "url": "https://api.infip.pro/images/generated-image-1.png"
    },
    {
      "url": "https://api.infip.pro/images/generated-image-2.png"
    }
  ],
  "usage": {
    "prompt_tokens": 15,
    "total_tokens": 15
  }
}

Async Models Response

For qwen, nano-banana, nbpro, and z-image-turbo models, you'll receive a task ID instead:

{
  "task_id": "task_abc123def456",
  "status": "pending",
  "poll_url": "https://api.infip.pro/v1/tasks/task_abc123def456",
  "created": 1734531234
}

Use the task_id to poll /v1/tasks/{task_id} for results.

POST

/v1/images/edits

Edit or extend an existing image based on a text prompt. Supports nbpro and nano-banana models.

GET

/v1/tasks/{task_id}

Poll the status of an async image generation task. Used with qwen, nano-banana, nbpro, and z-image-turbo models.

Error Responses

Status CodeDescription
200
Successful response with generated/edited images
400
Bad request - invalid parameters
401
Unauthorized - missing or invalid API key
422
Validation error - check request body format
429
Rate limit exceeded - slow down requests
500
Server error - try again later

Rate Limits & Processing Times

Rate Limits: Free tier: 30 requests/minute, 1000 requests/day

Sync Models: img3, img4, flux-schnell, lucid-origin, phoenix, sdxl, sdxl-lite - Immediate response (1-10 seconds)

Async Models: qwen, nano-banana, nbpro, z-image-turbo - Polling required (10-60 seconds typical, max 2 minutes)