语言: Русский · English · العربية · 简体中文
本页面为开发者和AI智能体提供的文档,无需身份验证即可访问,也支持自动化读取。
基础URL:https://neuralspace.pro。使用账户余额中的token付费(1 token = 1 ₽),无需订阅或国外银行卡。文本与对话接口兼容Anthropic和OpenAI的SDK——只需更改base_url和密钥即可。
请在账户中创建API密钥:https://neuralspace.pro/api-keys。密钥形如nsk-...,仅显示一次。请在请求头中传递:
x-api-key: nsk-your_key
也支持使用Authorization: Bearer nsk-...请求头(适用于兼容OpenAI的客户端)。
/v1/messages和/v1/chat/completions均支持流式传输(stream: true):响应以对应SDK(Anthropic / OpenAI)格式的Server-Sent Events方式返回。设置stream: false则返回常规JSON响应。本API的所有能力(图像/视频/音乐生成、与LLM对话、语音合成与识别、余额查询、价格查询)也以MCP服务器(Model Context Protocol)形式提供——你可以将其接入Claude Code、Claude Desktop、Cursor及其他任意MCP客户端,让你的AI智能体以你的账户身份自主生成内容。
接入地址(Streamable HTTP,无会话):https://neuralspace.pro/mcp。身份验证方式与直接调用API相同,在Authorization: Bearer或x-api-key请求头中传入同样的nsk-...密钥。
# 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服务器提供的工具:list_models(模型列表及实时价格)、get_balance(余额)、chat(LLM对话)、generate_image、generate_video + check_video、generate_music + check_music、text_to_speech、transcribe_audio。计费与退款规则与直接调用API完全一致;成功生成的内容会以卡片形式出现在你的账户中。若客户端的MCP工具超时时间较短,建议为同步图像生成(最长约2分钟)适当延长该超时时间。
GET /v1/balance——查询密钥所属账户的当前token余额:{ "balance": N, "currency": "tokens" }。GET /v1/models——以机器可读格式返回所有模型及其实时价格(相当于本页面的JSON版本)。两者均需提供密钥。
兼容Anthropic Messages API。可用模型: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。
请求体字段:model、messages({role, content}对象数组,role为user/assistant)、max_tokens(1—32000)、可选的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!"}]
}'
通过Anthropic SDK(Python)调用:Anthropic(base_url="https://neuralspace.pro", api_key="nsk-...")。
兼容OpenAI Chat Completions API。可用模型: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。
请求体字段:model、messages(role为system/user/assistant)、max_tokens或max_completion_tokens、可选的reasoning_effort(适用于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!"}]
}'
通过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=zh",
{ headers: { Authorization: "Bearer nsk-your_key" } }
);
同步接口:响应中直接返回可用的图像URL。仅在生成成功时扣除token。可用模型: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。
请求体字段:model、prompt(最多5000字符)、可选的aspect_ratio(gpt-image-2-pro支持:1:1/3:2/2:3)、resolution(1K/2K/4K——视模型支持情况而定)、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(数组——开启编辑/图生图模式)。
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": "太空中的一只猫,数字插画",
"resolution": "2K"
}'
响应:{ "data": [{ "url": "https://..." }], "usage": { "tokens": N } }。
视频生成通常需要数分钟,因此采用异步方式:POST创建任务并扣除token,随后轮询GET /v1/videos/generations/<id>获取结果。若出错或超时,token将被退还。可用模型: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。
请求体字段:model、prompt、可选的duration、resolution、speed(seedance)、mode(kling/grok)、quality(sora-2-pro)、audio(kling)、aspect_ratio、image_urls、multi_shots(分镜脚本——kling-3.0和wan-2.6)。
对于kling-3.0,还可使用以下字段:
multi_shots(true)+ shots——由2—5个分镜组成的脚本;每个分镜可以是一个prompt字符串,或形如{prompt, duration}的对象(启用multi_shots时,image_urls中最多允许提供1张图片);elements——一致性角色/物体的数组(最多4个);在prompt中通过@element_<name>引用某个元素。每个元素的格式为:{ "name": "...", "description": "...", "image_urls": [2—4张照片] },或用"video_url": "..."(1个视频)代替照片。# 1. 创建任务
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": "海洋上的日落", "duration": 5}'
# response: { "id": "task_...", "status": "pending", "poll_url": "..." }
# 2. 轮询状态,直到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://..." }] }
音乐生成(Suno)通常需要数分钟,因此采用异步方式:POST创建任务并扣除token,随后轮询GET /v1/music/generations/<id>获取结果。若出错或超时,token将被退还。一次生成通常会返回2首曲目。可用模型:V5_5, V5, V4_5PLUS, V4_5, V4。
请求体字段:model、prompt(音乐描述;在custom_mode下若包含人声,则为歌词内容)、可选的instrumental(纯伴奏,无人声)、custom_mode(需配合style和title使用)、style、title、negative_tags、vocal_gender(m/f)、duration——曲目时长(秒),范围10到360(仅V5_5模型在custom_mode: true时可用;未指定时由模型自行决定时长)。
# 1. 创建任务
curl https://neuralspace.pro/v1/music/generations \
-H "x-api-key: nsk-your_key" \
-H "content-type: application/json" \
-d '{"model": "V5", "prompt": "关于夜色都市的动感合成器浪潮音乐"}'
# response: { "id": "task_...", "status": "pending", "poll_url": "..." }
# 2. 轮询状态,直到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 }] }
兼容OpenAI Audio Speech API。同步接口:响应中直接返回可用的音频文件URL。仅在生成成功时按字符数扣除token。可用模型:tts-1, tts-1-hd。
请求体字段:model、input(文本,最多4096字符)、可选的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": "你好!这是NeuralSpace语音合成。"
}'
兼容OpenAI Audio Transcriptions API(Whisper)。文件以multipart/form-data格式发送。同步接口:响应中直接返回识别出的文本。仅在识别成功时按音频时长(根据文件大小估算)扣除token。可用模型:whisper-large-v3, whisper-1。文件大小限制——25 MB。
表单字段:file(音频格式:mp3/mp4/mpeg/mpga/m4a/wav/webm/ogg/flac)、model(whisper-large-v3;旧版whisper-1仍可使用,实际按large-v3运行)、可选的language(ISO语言代码,如ru/en)、prompt(上下文提示)。
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 } }
响应:{ "text": "识别出的文本", "model": "whisper-large-v3", "usage": { "tokens": 0.2 } }。
在你的账户中创建一个AI角色或语音助手(可在“角色”版块中查看)。若不提供image_url,则会创建一个使用预设音色的语音助手(voice_only)——速度快、成本低。若提供image_url(一张公开可访问的照片URL),则会创建带视频形象的角色。费用为10 token,成功后扣除。
字段:name(必填)、instruction(人设/系统指令)、voice(语音助手可选音色:alloy, echo, shimmer, sage, verse, coral, ash, ballad;默认alloy)、start_script(开场问候语)、image_url(用于生成视频形象的照片)、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": {...} } }
返回{ "data": [{ "id", "name", "characterType", "voice", "isVoiceOnly", ... }] }。
价格单位为站内token(1 token = 1 ₽)。价格为动态浮动价,可能随时调整;本页面始终展示当前实时价格。
价格是浮动的:每次请求都按实际发生的成本计费,因此表格中的数字仅供参考,并非固定价格。若某模型的价格在一天内发生波动,将在其下方显示过去24小时内的价格区间。
| 模型 | ID | 输入 / 100万 | 输出 / 100万 |
|---|---|---|---|
| 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 |
| 模型 | ID | 输入 / 100万 | 输出 / 100万 |
|---|---|---|---|
| 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 过去24小时 | 591.5 337.2–591.58 过去24小时 |
| 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 |
| 模型 | ID | 价格(token) | 单位 |
|---|---|---|---|
| Nano Banana (Gemini 2.5 Flash) | nano-banana | 1K — 3.5 | 每张图像 |
| Nano Banana Pro | nano-banana-pro | 1K — 9; 2K — 11.5; 4K — 15 | 每张图像 |
| Nano Banana 2 | nano-banana-2 | 1K — 7; 2K — 10.5; 4K — 16 | 每张图像 |
| Nano Banana 2 Lite | nano-banana-2-lite | 1K — 3.5 | 每张图像 |
| FLUX 2 Pro | flux-2-pro | 1K — 6; 2K — 6 | 每张图像 |
| GPT Image 1.5 | gpt-image-15 | medium — 3.5; high — 19.5 | 每张图像 |
| GPT Image 2 | gpt-image-2 | 1K — 5.5; 2K — 9; 4K — 14 | 每张图像 |
| GPT Image 2 Pro | gpt-image-2-pro | low — 1.07; medium — 9.41; high — 37.47 | 每张图像 |
| Seedream 4.5 | seedream-45 | 每张图片 — 6 | 每张图像 |
| Seedream 5 Lite | seedream-5-lite | 每张图片 — 5 | 每张图像 |
| Seedream 5 Pro | seedream-5-pro | basic (1K) — 6; high (2K) — 12.5 | 每张图像 |
| Grok Imagine 1 | grok-image | 每张图片 — 3.5 | 每张图像 |
| Grok Imagine 2 | grok-imagine-image-2 | 每张图片 — 3 | 每张图像 |
| NS-Image | ns-image | 每张图片 — 0.25 | 每张图像 |
| Z-Image | z-image | 每张图片 — 0.7 | 每张图像 |
| Ideogram V3 | ideogram | TURBO — 3; BALANCED — 6; QUALITY — 9 | 每张图像 |
| Midjourney v7 | midjourney | relaxed — 2.5; fast — 6.5; turbo — 13.5 | 每张图像 |
| 模型 | ID | 价格(token) | 单位 |
|---|---|---|---|
| Seedance 2.0 (ByteDance) | seedance-2.0 | fast 720p — 59; standard 720p — 89; fast 1080p — 328; standard 1080p — 408 | 每5秒 |
| Veo 3.1 Quality | veo-3.1 | 每个视频 — 222 | 每个视频 |
| Veo 3.1 Fast | veo-3.1-fast | 每个视频 — 53.5 | 每个视频 |
| Veo 3.1 Lite | veo-3.1-lite | 每个视频 — 26.5 | 每个视频 |
| Sora 2 (OpenAI) | sora-2 | 10 c — 20; 15 c — 23.5 | 每个视频 |
| 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 | 每个视频 |
| Kling O3 (Kuaishou) | kling-o3 | 720p — 43; 1080p — 55.5; 4K — 206 | 每5秒 |
| Kling 3.0 (Kuaishou) | kling-3.0 | std — 51.5; pro — 66.5; 4K — 247 | 每5秒 |
| Kling 3.0 Turbo (Kuaishou) | kling-3-0-turbo | 720p — 66.5; 1080p — 83 | 每5秒 |
| Grok Imagine (xAI) | grok-imagine | 480p — 13; 720p — 24 | 每6秒 |
| Wan 2.6 (Alibaba) | wan-2.6 | 720p — 63; 1080p — 94 | 每5秒 |
| 模型 | ID | 价格(token) | 单位 |
|---|---|---|---|
| Suno V5.5 | V5_5 | 每次生成 — 10.5 | 每次生成 |
| Suno V5 | V5 | 每次生成 — 10.5 | 每次生成 |
| Suno V4.5+ | V4_5PLUS | 每次生成 — 10.5 | 每次生成 |
| Suno V4.5 | V4_5 | 每次生成 — 10.5 | 每次生成 |
| Suno V4 | V4 | 每次生成 — 10.5 | 每次生成 |
| 模型 | ID | 价格(token) | 单位 |
|---|---|---|---|
| OpenAI TTS | tts-1 | 每 1000 字符 — 2.67 | 每1000字符 |
| OpenAI TTS HD | tts-1-hd | 每 1000 字符 — 5.33 | 每1000字符 |
| 模型 | ID | 价格(token) | 单位 |
|---|---|---|---|
| Whisper large-v3 | whisper-large-v3 | 每分钟 — 0.27 | 每分钟 |
| Whisper(兼容,= large-v3) | whisper-1 | 每分钟 — 0.27 | 每分钟 |
文本接口返回Anthropic格式的错误({ "type": "error", "error": { "type", "message" } }),对话接口返回OpenAI格式的错误({ "error": { "message", "type" } })。错误代码:401——密钥缺失或无效,403——账户已被暂停,429——超出速率限制,400——请求无效或token余额不足。
技术支持与余额充值:https://neuralspace.pro/payment。管理密钥:https://neuralspace.pro/api-keys。