1. Get your API key
API access is included in VIP and Elite plans.
- Open neuralbox.top/web → Profile → API Keys
- Click Create Key, give it a name
- Copy the key — it starts with
nb_
Store your key securely. It provides full access to your token balance. Never expose it in client-side code.
2. The unified generation endpoint
All generations go through a single endpoint: POST /api/v2/generate
You pass any model slug + prompt + optional params object. This works for text, images, video, audio, and tools — same endpoint, different model slug.
curl -X POST https://neuralbox.top/api/v2/generate \
-H "Authorization: Bearer nb_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"prompt": "Explain quantum computing in simple terms"
}'
3. Response structure
{
"id": 18473,
"status": "completed",
"model_slug": "gpt-5",
"result_text": "Quantum computing uses qubits that can exist in multiple states simultaneously...",
"result_url": null,
"thumbnail_url": null,
"error": null,
"tokens_spent": 3,
"processing_ms": 1842,
"result_metadata": null
}
| Field | Description |
|---|
result_text | Text output (LLM responses) |
result_url | File URL (images, video, audio) |
tokens_spent | Tokens deducted from balance |
status | completed / pending / failed |
id | Integer ID — use for polling async jobs |
4. Generate an image
Pass model-specific options in the params object:
curl -X POST https://neuralbox.top/api/v2/generate \
-H "Authorization: Bearer nb_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "A futuristic city at sunset, cyberpunk style",
"params": {
"size": "1024x1024",
"format": "webp"
}
}'
Response:
{
"id": 18491,
"status": "completed",
"model_slug": "dall-e-3",
"result_url": "https://storage.neuralbox.top/generations/18491.webp",
"tokens_spent": 7,
"result_metadata": { "width": 1024, "height": 1024 }
}
5. Check balance
curl https://neuralbox.top/api/v2/balance \
-H "Authorization: Bearer nb_YOUR_API_KEY"
{
"token_balance": 283,
"plan": "vip",
"plan_expires_at": "2026-04-08T00:00:00Z"
}
6. Poll async results
For video/slow models, status is pending. Poll GET /api/v2/generate/{id}:
import time
def wait_for_result(gen_id: int, headers: dict) -> dict:
while True:
r = requests.get(
f"https://neuralbox.top/api/v2/generate/{gen_id}",
headers=headers
)
data = r.json()
if data["status"] in ("completed", "failed"):
return data
time.sleep(5)
Next steps