Language: Русский · English · العربية · 简体中文
Documentation for developers and AI agents. This page is available without authentication and is intended, among other things, to be read automatically.
Base URL: https://neuralspace.pro. You pay with account balance tokens (1 token = 1 ₽), no subscriptions or foreign cards required. The text and chat endpoints are compatible with the Anthropic and OpenAI SDKs — just change base_url and the key.
Create an API key in your account: https://neuralspace.pro/api-keys. The key looks like nsk-... and is shown only once. Pass it in the header:
x-api-key: nsk-your_key
The Authorization: Bearer nsk-... header is also accepted (for OpenAI-compatible clients).
stream: true) is supported on /v1/messages and /v1/chat/completions: the response arrives via Server-Sent Events in the format of the corresponding SDK (Anthropic / OpenAI). With stream: false you get a regular JSON response.Everything this API can do (image/video/music generation, chatting with LLMs, speech synthesis and recognition, balance, prices) is also available as an MCP server (Model Context Protocol) — you can connect it to Claude Code, Claude Desktop, Cursor and any other MCP client, and your AI agent will generate content itself on behalf of your account.
Endpoint (Streamable HTTP, sessionless): https://neuralspace.pro/mcp. Authorization — the same nsk-... key in the Authorization: Bearer or x-api-key header.
# Claude Code
claude mcp add --transport http neuralspace https://neuralspace.pro/mcp \
--header "Authorization: Bearer nsk-your_key"
// Cursor / Claude Desktop and other streamable-http clients
{
"mcpServers": {
"neuralspace": {
"type": "http",
"url": "https://neuralspace.pro/mcp",
"headers": { "Authorization": "Bearer nsk-your_key" }
}
}
}
// Clients that only speak stdio — via the mcp-remote bridge
{
"mcpServers": {
"neuralspace": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://neuralspace.pro/mcp",
"--header", "Authorization: Bearer nsk-your_key"]
}
}
}
MCP server tools: list_models (models and live prices), get_balance (balance), chat (LLM), generate_image, generate_video + check_video, generate_music + check_music, text_to_speech, transcribe_audio. Billing and refunds work exactly as for direct API calls; successful generations appear as cards in your account. For synchronous image generation (up to ~2 minutes) increase the MCP tool timeout in your client if it is lower.
GET /v1/balance — the current token balance of the key owner: { "balance": N, "currency": "tokens" }. GET /v1/models — a machine-readable list of all models with live prices (the JSON version of this page). Both require a key.
Compatible with the Anthropic Messages API. Models: claude-haiku-4-5, claude-sonnet-4-6, claude-sonnet-5, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, claude-opus-5, claude-fable-5.
Body fields: model, messages (array of {role, content}, role — user/assistant), max_tokens (1—32000), optional system.
curl https://neuralspace.pro/v1/messages \
-H "x-api-key: nsk-your_key" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello!"}]
}'
Via the Anthropic SDK (Python): Anthropic(base_url="https://neuralspace.pro", api_key="nsk-...").
Compatible with the OpenAI Chat Completions API. Models: gpt-5-6, gpt-5-6-balanced, gpt-5-6-fast, gpt-5-mini, gpt-5-4-mini, grok-4-6, grok-4-5, grok-4-3, kimi-k2.6, kimi-k3, glm-5.2, deepseek-v4-flash, deepseek-v4-pro.
Body fields: model, messages (role — system/user/assistant), max_tokens or max_completion_tokens, optional reasoning_effort (for gpt-5-6 / gpt-5-6-balanced / gpt-5-6-fast, grok-4-5).
curl https://neuralspace.pro/v1/chat/completions \
-H "Authorization: Bearer nsk-your_key" \
-H "content-type: application/json" \
-d '{
"model": "gpt-5-6-balanced",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Via the OpenAI SDK: OpenAI(base_url="https://neuralspace.pro/v1", api_key="nsk-...").
Grok Think Fast is available over WebSocket for native speech-to-speech. Sessions are limited to 120 minutes. Billing uses the actual duration of input and output audio; the exact amount is in the price table above.
const ws = new WebSocket(
"wss://neuralspace.pro/v1/realtime?model=grok-voice-think-fast-2.0&lang=en",
{ headers: { Authorization: "Bearer nsk-your_key" } }
);
Synchronous: the response contains a ready URL. Tokens are charged only on success. Models: nano-banana, nano-banana-pro, nano-banana-2, nano-banana-2-lite, flux-2-pro, gpt-image-15, gpt-image-2, gpt-image-2-pro, seedream-45, seedream-5-lite, seedream-5-pro, grok-image, grok-imagine-image-2, ns-image, z-image, ideogram, midjourney.
Body fields: model, prompt (up to 5000 characters), optional aspect_ratio (gpt-image-2-pro: 1:1/3:2/2:3), resolution (1K/2K/4K — where supported), output_format (jpeg/png — nano-banana-pro; jpeg/png/webp — gpt-image-2-pro), quality (medium/high — gpt-image-15; low/medium/high — gpt-image-2-pro), mode (relaxed/fast/turbo — midjourney), image_urls (array — enables edit / image-to-image mode).
curl https://neuralspace.pro/v1/images/generations \
-H "x-api-key: nsk-your_key" \
-H "content-type: application/json" \
-d '{
"model": "nano-banana-pro",
"prompt": "A cat in space, digital illustration",
"resolution": "2K"
}'
Response: { "data": [{ "url": "https://..." }], "usage": { "tokens": N } }.
Video takes minutes to generate, so it is asynchronous: POST creates a task and charges tokens, then poll GET /v1/videos/generations/<id>. On error/timeout the tokens are refunded. Models: seedance-2.0, veo-3.1, veo-3.1-fast, veo-3.1-lite, sora-2, sora-2-pro, kling-o3, kling-3.0, kling-3-0-turbo, grok-imagine, wan-2.6.
Body fields: model, prompt, optional duration, resolution, speed (seedance), mode (kling/grok), quality (sora-2-pro), audio (kling), aspect_ratio, image_urls, multi_shots (storyboard — kling-3.0 and wan-2.6).
Additionally for kling-3.0:
multi_shots (true) + shots — a storyboard of 2—5 shots; each shot is a prompt string or an object {prompt, duration} (with multi_shots at most one image is allowed in image_urls);elements — an array (up to 4) of consistent characters/objects; reference an element in the prompt as @element_<name>. Each element: { "name": "...", "description": "...", "image_urls": [2—4 photos] } or, instead of photos, "video_url": "..." (1 video).# 1. create the task
curl https://neuralspace.pro/v1/videos/generations \
-H "x-api-key: nsk-your_key" \
-H "content-type: application/json" \
-d '{"model": "seedance-2.0", "prompt": "Sunset over the ocean", "duration": 5}'
# response: { "id": "task_...", "status": "pending", "poll_url": "..." }
# 2. poll the status until status != completed/failed
curl https://neuralspace.pro/v1/videos/generations/task_... \
-H "x-api-key: nsk-your_key"
# when completed: { "status": "completed", "data": [{ "url": "https://..." }] }
Music (Suno) takes minutes to generate, so it is asynchronous: POST creates a task and charges tokens, then poll GET /v1/music/generations/<id>. On error/timeout the tokens are refunded. One generation usually returns 2 tracks. Models: V5_5, V5, V4_5PLUS, V4_5, V4.
Body fields: model, prompt (description of the music; in custom_mode with vocals — the song lyrics), optional instrumental (no vocals), custom_mode (requires style and title), style, title, negative_tags, vocal_gender (m/f), duration — track length in seconds, from 10 to 360 (available only for the V5_5 model together with custom_mode: true; without it the model chooses the length).
# 1. create the task
curl https://neuralspace.pro/v1/music/generations \
-H "x-api-key: nsk-your_key" \
-H "content-type: application/json" \
-d '{"model": "V5", "prompt": "Energetic synthwave about a night city"}'
# response: { "id": "task_...", "status": "pending", "poll_url": "..." }
# 2. poll the status until status != completed/failed
curl https://neuralspace.pro/v1/music/generations/task_... \
-H "x-api-key: nsk-your_key"
# when completed: { "status": "completed", "data": [{ "url": "https://...", "title": "...", "duration": 123 }] }
Compatible with the OpenAI Audio Speech API. Synchronous: the response contains a ready audio file URL. Tokens are charged only on success, by number of characters. Models: tts-1, tts-1-hd.
Body fields: model, input (text, up to 4096 characters), optional voice (alloy/echo/fable/onyx/nova/shimmer), response_format (mp3/opus/aac/flac/wav).
curl https://neuralspace.pro/v1/audio/speech \
-H "Authorization: Bearer nsk-your_key" \
-H "content-type: application/json" \
-d '{
"model": "tts-1",
"voice": "alloy",
"input": "Hello! This is NeuralSpace speech synthesis."
}'
Compatible with the OpenAI Audio Transcriptions API (Whisper). The file is sent as multipart/form-data. Synchronous: the response contains the recognized text. Tokens are charged only on success, by audio duration (estimated from file size). Models: whisper-large-v3, whisper-1. File limit — 25 MB.
Form fields: file (audio: mp3/mp4/mpeg/mpga/m4a/wav/webm/ogg/flac), model (whisper-large-v3; the legacy whisper-1 is accepted and run as large-v3), optional language (ISO code, e.g. ru/en), prompt (context hint).
curl https://neuralspace.pro/v1/audio/transcriptions \
-H "Authorization: Bearer nsk-your_key" \
-F model="whisper-large-v3" \
-F file="@audio.mp3"
# response: { "text": "...", "model": "whisper-large-v3", "usage": { "tokens": 0.2 } }
Response: { "text": "recognized text", "model": "whisper-large-v3", "usage": { "tokens": 0.2 } }.
Creates an AI character or voice assistant in your account (available in the “Characters” section). Without image_url a voice assistant (voice_only) with a preset voice is created — fast and cheap. With image_url (a public photo URL) a character with a video avatar is created. Cost — 10 tokens, charged on success.
Fields: name (required), instruction (persona / system instruction), voice (for voice assistant: alloy, echo, shimmer, sage, verse, coral, ash, ballad; default alloy), start_script (greeting), image_url (photo for a video avatar), language (ru/en).
curl https://neuralspace.pro/v1/characters \
-H "Authorization: Bearer nsk-your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "My assistant", "instruction": "A friendly product assistant", "voice": "verse" }'
# response: { "character": { "id": "voice-...", "name": "...", "characterType": "voice_only", "voice": {...} } }
Returns { "data": [{ "id", "name", "characterType", "voice", "isVoiceOnly", ... }] }.
Prices are in site tokens (1 token = 1 ₽). Rates are dynamic and may change; this page always reflects the current values.
Prices float: each request is charged its actual cost, so the figures in the tables are a reference, not a fixed rate. Where a model price moves during the day, the range over the last 24 hours is shown below it.
| Model | ID | Input / 1M | Output / 1M |
|---|---|---|---|
| Claude Haiku 4.5 | claude-haiku-4-5 | 40.5 | 211 |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | 186.5 | 932 |
| Claude Sonnet 5 | claude-sonnet-5 | 151 | 759 |
| Claude Opus 4.6 | claude-opus-4-6 | 253 | 1269.5 |
| Claude Opus 4.7 | claude-opus-4-7 | 253 | 1269.5 |
| Claude Opus 4.8 | claude-opus-4-8 | 355 | 1775.5 |
| Claude Opus 5 | claude-opus-5 | 355 | 1775.5 |
| Claude Fable 5 | claude-fable-5 | 710 | 3551 |
| Model | ID | Input / 1M | Output / 1M |
|---|---|---|---|
| GPT-5.6 Sol | gpt-5-6 | 207 | 1242.5 |
| GPT-5.6 Terra | gpt-5-6-balanced | 103.5 | 621 |
| GPT-5.6 Luna | gpt-5-6-fast | 52 | 251.5 |
| GPT-5 Mini | gpt-5-mini | 44.5 | 355 |
| GPT-5.4 Mini | gpt-5-4-mini | 133 | 799 |
| Grok 4.6 | grok-4-6 | 118.5 | 355 |
| Grok 4.5 | grok-4-5 | 118.5 | 355 |
| Grok 4.3 | grok-4-3 | 89 | 177.5 |
| Kimi K2.6 (Moonshot) | kimi-k2.6 | 140.5 80.08–140.5 over 24h | 591.5 337.2–591.58 over 24h |
| Kimi K3 (Moonshot) | kimi-k3 | 443.5 | 2218.5 |
| GLM-5.2 (Zhipu) | glm-5.2 | 143 | 449 |
| DeepSeek V4 Flash | deepseek-v4-flash | 20.5 | 41.5 |
| DeepSeek V4 Pro | deepseek-v4-pro | 64.5 | 128.5 |
| Model | ID | Rates (tokens) | Unit |
|---|---|---|---|
| Nano Banana (Gemini 2.5 Flash) | nano-banana | 1K — 3.5 | per image |
| Nano Banana Pro | nano-banana-pro | 1K — 9; 2K — 11.5; 4K — 15 | per image |
| Nano Banana 2 | nano-banana-2 | 1K — 7; 2K — 10.5; 4K — 16 | per image |
| Nano Banana 2 Lite | nano-banana-2-lite | 1K — 3.5 | per image |
| FLUX 2 Pro | flux-2-pro | 1K — 6; 2K — 6 | per image |
| GPT Image 1.5 | gpt-image-15 | medium — 3.5; high — 19.5 | per image |
| GPT Image 2 | gpt-image-2 | 1K — 5.5; 2K — 9; 4K — 14 | per image |
| GPT Image 2 Pro | gpt-image-2-pro | low — 1.07; medium — 9.41; high — 37.47 | per image |
| Seedream 4.5 | seedream-45 | per image — 6 | per image |
| Seedream 5 Lite | seedream-5-lite | per image — 5 | per image |
| Seedream 5 Pro | seedream-5-pro | basic (1K) — 6; high (2K) — 12.5 | per image |
| Grok Imagine 1 | grok-image | per image — 3.5 | per image |
| Grok Imagine 2 | grok-imagine-image-2 | per image — 3 | per image |
| NS-Image | ns-image | per image — 0.25 | per image |
| Z-Image | z-image | per image — 0.7 | per image |
| Ideogram V3 | ideogram | TURBO — 3; BALANCED — 6; QUALITY — 9 | per image |
| Midjourney v7 | midjourney | relaxed — 2.5; fast — 6.5; turbo — 13.5 | per image |
| Model | ID | Rates (tokens) | Unit |
|---|---|---|---|
| Seedance 2.0 (ByteDance) | seedance-2.0 | fast 720p — 59; standard 720p — 89; fast 1080p — 328; standard 1080p — 408 | per 5 s |
| Veo 3.1 Quality | veo-3.1 | per video — 222 | per video |
| Veo 3.1 Fast | veo-3.1-fast | per video — 53.5 | per video |
| Veo 3.1 Lite | veo-3.1-lite | per video — 26.5 | per video |
| Sora 2 (OpenAI) | sora-2 | 10 c — 20; 15 c — 23.5 | per video |
| Sora 2 Pro (OpenAI) | sora-2-pro | standard 10 c — 100; standard 15 c — 166.5; high 10 c — 225; high 15 c — 416.5 | per video |
| Kling O3 (Kuaishou) | kling-o3 | 720p — 43; 1080p — 55.5; 4K — 206 | per 5 s |
| Kling 3.0 (Kuaishou) | kling-3.0 | std — 51.5; pro — 66.5; 4K — 247 | per 5 s |
| Kling 3.0 Turbo (Kuaishou) | kling-3-0-turbo | 720p — 66.5; 1080p — 83 | per 5 s |
| Grok Imagine (xAI) | grok-imagine | 480p — 13; 720p — 24 | per 6 s |
| Wan 2.6 (Alibaba) | wan-2.6 | 720p — 63; 1080p — 94 | per 5 s |
| Model | ID | Rates (tokens) | Unit |
|---|---|---|---|
| Suno V5.5 | V5_5 | per generation — 10.5 | per generation |
| Suno V5 | V5 | per generation — 10.5 | per generation |
| Suno V4.5+ | V4_5PLUS | per generation — 10.5 | per generation |
| Suno V4.5 | V4_5 | per generation — 10.5 | per generation |
| Suno V4 | V4 | per generation — 10.5 | per generation |
| Model | ID | Rates (tokens) | Unit |
|---|---|---|---|
| OpenAI TTS | tts-1 | per 1000 characters — 2.67 | per 1000 characters |
| OpenAI TTS HD | tts-1-hd | per 1000 characters — 5.33 | per 1000 characters |
| Model | ID | Rates (tokens) | Unit |
|---|---|---|---|
| Whisper large-v3 | whisper-large-v3 | per minute — 0.27 | per minute |
| Whisper (compat, = large-v3) | whisper-1 | per minute — 0.27 | per minute |
The text endpoint returns errors in the Anthropic format ({ "type": "error", "error": { "type", "message" } }), chat — in the OpenAI format ({ "error": { "message", "type" } }). Codes: 401 — missing/invalid key, 403 — account suspended, 429 — rate limit exceeded, 400 — invalid request or insufficient tokens.
Support and balance top-up: https://neuralspace.pro/payment. Manage keys: https://neuralspace.pro/api-keys.