Skip to main content
POST
/
api
/
v2
/
generate
AI Tools
curl --request POST \
  --url https://api.example.com/api/v2/generate
All AI tools are available on the Starter tier (no subscription required). Cost: 1–3 tokens.

Available Tools

SlugNameTokensDescription
upscaleUpscale ESRGAN12×/4× image upscaling
face-swapFace Swap1Swap faces between two images
remove-bgRemove BG1Remove background from any image
style-transferStyle Transfer1Apply artistic style to an image
colorizeColorize1Colorize black-and-white photos
inpaintInPaint Edit3Edit a selected region by repainting
text-ocrText OCR1Extract text from images

Request Format

Tools use the same POST /api/v2/generate endpoint. Pass the tool slug as model and the image URL in params:
curl -X POST https://neuralbox.top/api/v2/generate \
  -H "Authorization: Bearer nb_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "remove-bg",
    "prompt": "remove background",
    "params": {
      "image_url": "https://example.com/photo.jpg"
    }
  }'

Code Examples

import requests

res = requests.post(
    "https://neuralbox.top/api/v2/generate",
    headers={"Authorization": "Bearer nb_YOUR_API_KEY"},
    json={
        "model": "remove-bg",
        "prompt": "remove background",
        "params": {"image_url": "https://example.com/portrait.jpg"}
    }
)
print(res.json()["result_url"])

Response

{
  "id": 18530,
  "status": "completed",
  "model_slug": "remove-bg",
  "result_url": "https://storage.neuralbox.top/generations/18530.png",
  "tokens_spent": 1,
  "processing_ms": 2140
}
All tools process images immediately (synchronous). No polling needed — status will always be completed in the initial response.