NightVeil API
An OpenAI-compatible API for private, uncensored AI. If your stack already speaks OpenAI, change two things — the base URL and the key — and you're live.
Overview
Every endpoint lives under your base URL. All requests and responses are JSON unless noted (audio/video return binary).
| Field | Type | Required | Description |
|---|---|---|---|
| Protocol | HTTPS | required | TLS only. Plain HTTP is refused. |
| Format | JSON | required | application/json request/response, except binary media downloads. |
| Compatibility | OpenAI v1 | required | Chat, embeddings, images, and audio mirror the OpenAI REST shapes. |
| Streaming | buffered | optional | Responses are returned fully buffered today. SSE token streaming is on the roadmap; a stream:true flag is currently ignored. |
Authentication
Authenticate with a secret key from your reseller console as a bearer token. Keys begin with nv_ and are shown once at creation — store them server-side and never ship them to a browser or mobile client.
Keys can be revoked instantly from your console or the key-management API. A revoked, missing, or malformed key returns 401.
Quickstart
Drop in with the official OpenAI SDKs — only the base URL changes.
Models & content tiers
Pass any model your account can access in the model field. The live roster — text, vision, image, audio, and embedding models — is shown in your reseller console. Model IDs in these docs (veil-large, etc.) are placeholders.
| Field | Type | Required | Description |
|---|---|---|---|
| Standard | tier | optional | Default. Safe-for-work models. Any key works. |
| Uncensored | tier | optional | Unfiltered models. Requires an uncensored-tier key. The account must be age-verified; resellers carry this by agreement. Mint the key in your console. |
403 CONTENT_TIER_FORBIDDEN. If the account is not age-verified where required, you'll get 403 AGE_VERIFICATION_REQUIRED. Reseller accounts carry age compliance at the account level by agreement.Current catalog (your reseller console shows the live, account-specific list):
Text · chat · reasoning · vision · 90
| Model | Price (incl. markup) |
|---|---|
| aion-labs-aion-2-0 | $1.50 in · $3.00 out / 1M tok |
| arcee-trinity-large-thinking | $0.47 in · $1.69 out / 1M tok |
| claude-fable-5 | $18.00 in · $90.00 out / 1M tok |
| claude-opus-4-5 | $9.00 in · $45.00 out / 1M tok |
| claude-opus-4-6 | $9.00 in · $45.00 out / 1M tok |
| claude-opus-4-6-fast | $54.00 in · $270.00 out / 1M tok |
| claude-opus-4-7 | $9.00 in · $45.00 out / 1M tok |
| claude-opus-4-7-fast | $54.00 in · $270.00 out / 1M tok |
| claude-opus-4-8 | $9.00 in · $45.00 out / 1M tok |
| claude-opus-4-8-fast | $18.00 in · $90.00 out / 1M tok |
| claude-sonnet-4-5 | $5.63 in · $28.13 out / 1M tok |
| claude-sonnet-4-6 | $5.40 in · $27.00 out / 1M tok |
| deepseek-v3.2 | $0.49 in · $0.72 out / 1M tok |
| deepseek-v4-flash | $0.26 in · $0.52 out / 1M tok |
| deepseek-v4-pro | $2.59 in · $5.69 out / 1M tok |
| e2ee-gemma-3-27b-p | $0.21 in · $0.75 out / 1M tok |
| e2ee-gemma-4-26b-a4b-uncensored-p | $0.29 in · $1.32 out / 1M tok |
| e2ee-gemma-4-31b | $0.21 in · $0.65 out / 1M tok |
| e2ee-glm-4-7-flash-p | $0.20 in · $0.83 out / 1M tok |
| e2ee-glm-4-7-p | $1.65 in · $6.23 out / 1M tok |
| e2ee-glm-5-1 | $1.65 in · $6.23 out / 1M tok |
| e2ee-gpt-oss-120b-p | $0.20 in · $0.98 out / 1M tok |
| e2ee-gpt-oss-20b-p | $0.0750 in · $0.29 out / 1M tok |
| e2ee-qwen-2-5-7b-p | $0.0750 in · $0.20 out / 1M tok |
| e2ee-qwen3-30b-a3b-p | $0.29 in · $1.03 out / 1M tok |
| e2ee-qwen3-6-35b-a3b | $0.27 in · $1.77 out / 1M tok |
| e2ee-qwen3-6-35b-a3b-uncensored-p | $0.57 in · $2.82 out / 1M tok |
| e2ee-qwen3-vl-30b-a3b-p | $0.38 in · $1.35 out / 1M tok |
| gemini-3-1-pro-preview | $3.75 in · $22.50 out / 1M tok |
| gemini-3-5-flash | $2.33 in · $14.17 out / 1M tok |
| gemini-3-flash-preview | $1.05 in · $5.63 out / 1M tok |
| gemma-4-uncensored | $0.24 in · $0.75 out / 1M tok |
| google-gemma-3-27b-it | $0.18 in · $0.30 out / 1M tok |
| google-gemma-4-26b-a4b-it | $0.24 in · $0.75 out / 1M tok |
| google-gemma-4-31b-it | $0.18 in · $0.54 out / 1M tok |
| grok-4-20 | $2.13 in · $4.25 out / 1M tok |
| grok-4-20-multi-agent | $2.13 in · $4.25 out / 1M tok |
| grok-4-3 | $2.13 in · $4.25 out / 1M tok |
| grok-build-0-1 | $1.50 in · $3.00 out / 1M tok |
| hermes-3-llama-3.1-405b | $1.65 in · $4.50 out / 1M tok |
| kimi-k2-5 | $0.84 in · $5.25 out / 1M tok |
| kimi-k2-6 | $1.27 in · $6.98 out / 1M tok |
| llama-3.2-3b | $0.22 in · $0.90 out / 1M tok |
| llama-3.3-70b | $1.05 in · $4.20 out / 1M tok |
| mercury-2 | $0.47 in · $1.41 out / 1M tok |
| minimax-m25 | $0.51 in · $1.78 out / 1M tok |
| minimax-m27 | $0.56 in · $2.25 out / 1M tok |
| minimax-m3 | $0.45 in · $1.80 out / 1M tok |
| minimax-m3-preview | $0.45 in · $1.80 out / 1M tok |
| mistral-small-2603 | $0.28 in · $1.13 out / 1M tok |
| mistral-small-3-2-24b-instruct | $0.14 in · $0.38 out / 1M tok |
| nvidia-nemotron-3-nano-30b-a3b | $0.11 in · $0.45 out / 1M tok |
| nvidia-nemotron-3-ultra-550b-a55b | $0.94 in · $4.69 out / 1M tok |
| nvidia-nemotron-cascade-2-30b-a3b | $0.21 in · $1.20 out / 1M tok |
| olafangensan-glm-4.7-flash-heretic | $0.21 in · $1.20 out / 1M tok |
| openai-gpt-4o-2024-11-20 | $4.69 in · $18.75 out / 1M tok |
| openai-gpt-4o-mini-2024-07-18 | $0.28 in · $1.13 out / 1M tok |
| openai-gpt-52 | $3.29 in · $26.25 out / 1M tok |
| openai-gpt-52-codex | $3.29 in · $26.25 out / 1M tok |
| openai-gpt-53-codex | $3.29 in · $26.25 out / 1M tok |
| openai-gpt-54 | $4.70 in · $28.20 out / 1M tok |
| openai-gpt-54-mini | $1.41 in · $8.44 out / 1M tok |
| openai-gpt-54-pro | $56.25 in · $337.50 out / 1M tok |
| openai-gpt-55 | $9.38 in · $56.25 out / 1M tok |
| openai-gpt-55-pro | $56.25 in · $337.50 out / 1M tok |
| openai-gpt-oss-120b | $0.11 in · $0.45 out / 1M tok |
| qwen-3-6-plus | $0.94 in · $5.63 out / 1M tok |
| qwen-3-7-max | $4.05 in · $12.08 out / 1M tok |
| qwen-3-7-plus | $0.75 in · $3.00 out / 1M tok |
| qwen3-235b-a22b-instruct-2507 | $0.22 in · $1.13 out / 1M tok |
| qwen3-235b-a22b-thinking-2507 | $0.68 in · $5.25 out / 1M tok |
| qwen3-5-35b-a3b | $0.47 in · $1.88 out / 1M tok |
| qwen3-5-397b-a17b | $1.13 in · $6.75 out / 1M tok |
| qwen3-5-9b | $0.15 in · $0.22 out / 1M tok |
| qwen3-6-27b | $0.49 in · $4.88 out / 1M tok |
| qwen3-coder-480b-a35b-instruct-turbo | $0.52 in · $2.25 out / 1M tok |
| qwen3-next-80b | $0.52 in · $2.85 out / 1M tok |
| qwen3-vl-235b-a22b | $0.38 in · $2.25 out / 1M tok |
| tencent-hy3-preview | $0.0945 in · $0.32 out / 1M tok |
| veil-roleplay | $0.75 in · $3.00 out / 1M tok |
| veil-uncensored | $0.30 in · $1.35 out / 1M tok |
| veil-uncensored-24b | $0.38 in · $1.72 out / 1M tok |
| xiaomi-mimo-v2-5 | $0.26 in · $0.52 out / 1M tok |
| z-ai-glm-5-turbo | $1.80 in · $6.00 out / 1M tok |
| z-ai-glm-5v-turbo | $2.25 in · $7.50 out / 1M tok |
| zai-org-glm-4.6 | $1.27 in · $4.13 out / 1M tok |
| zai-org-glm-4.7 | $0.83 in · $3.97 out / 1M tok |
| zai-org-glm-4.7-flash | $0.19 in · $0.75 out / 1M tok |
| zai-org-glm-5 | $1.50 in · $4.80 out / 1M tok |
| zai-org-glm-5-1 | $2.63 in · $8.25 out / 1M tok |
Image · 45
| Model | Price (incl. markup) |
|---|---|
| bria-bg-remover | $0.0450 / image |
| chroma | $0.0150 / image |
| firered-image-edit | see console |
| flux-2-max | $0.14 / image |
| flux-2-max-edit | see console |
| flux-2-pro | $0.0600 / image |
| gpt-image-1-5 | $0.39 / image |
| gpt-image-1-5-edit | see console |
| gpt-image-2 | $0.41 / image |
| gpt-image-2-edit | $0.54 / image |
| grok-imagine-edit | $0.0600 / image |
| grok-imagine-image | $0.0600 / image |
| grok-imagine-image-quality | $0.12 / image |
| grok-imagine-quality-edit | $0.15 / image |
| hunyuan-image-v3 | $0.14 / image |
| ideogram-v4 | $0.22 / image |
| imagineart-1.5-pro | $0.0900 / image |
| krea-v2-large | $0.11 / image |
| krea-v2-medium | $0.0600 / image |
| lustify-sdxl | $0.0150 / image |
| lustify-v7 | $0.0150 / image |
| lustify-v8 | $0.0150 / image |
| nano-banana-2 | $0.15 / image |
| nano-banana-2-edit | $0.15 / image |
| nano-banana-pro | $0.27 / image |
| nano-banana-pro-edit | $0.27 / image |
| qwen-edit | see console |
| qwen-edit-uncensored | see console |
| qwen-image | $0.0450 / image |
| qwen-image-2 | $0.0750 / image |
| qwen-image-2-edit | see console |
| qwen-image-2-pro | $0.15 / image |
| qwen-image-2-pro-edit | see console |
| recraft-v4 | $0.0750 / image |
| recraft-v4-pro | $0.43 / image |
| seedream-v4 | $0.0750 / image |
| seedream-v4-edit | see console |
| seedream-v5-lite | $0.0750 / image |
| seedream-v5-lite-edit | see console |
| veil-diffuse | $0.0150 / image |
| wai-Illustrious | $0.0150 / image |
| wan-2-7-pro-edit | see console |
| wan-2-7-pro-text-to-image | $0.14 / image |
| wan-2-7-text-to-image | $0.0562 / image |
| z-image-turbo | $0.0150 / image |
Video · async, quoted per clip · 99
| Model | Price (incl. markup) |
|---|---|
| grok-imagine-1-5-image-to-video-private | quoted per clip · usage-based |
| grok-imagine-image-to-video | quoted per clip · usage-based |
| grok-imagine-image-to-video-private | quoted per clip · usage-based |
| grok-imagine-reference-to-video | quoted per clip · usage-based |
| grok-imagine-reference-to-video-private | quoted per clip · usage-based |
| grok-imagine-text-to-video | quoted per clip · usage-based |
| grok-imagine-text-to-video-private | quoted per clip · usage-based |
| grok-imagine-video-to-video-private | quoted per clip · usage-based |
| happyhorse-1-0-image-to-video | quoted per clip · usage-based |
| happyhorse-1-0-reference-to-video | quoted per clip · usage-based |
| happyhorse-1-0-text-to-video | quoted per clip · usage-based |
| happyhorse-1-0-video-to-video | quoted per clip · usage-based |
| kling-2.5-turbo-pro-image-to-video | quoted per clip · usage-based |
| kling-2.5-turbo-pro-text-to-video | quoted per clip · usage-based |
| kling-2.6-pro-image-to-video | quoted per clip · usage-based |
| kling-2.6-pro-text-to-video | quoted per clip · usage-based |
| kling-o3-4k-image-to-video | quoted per clip · usage-based |
| kling-o3-4k-reference-to-video | quoted per clip · usage-based |
| kling-o3-4k-text-to-video | quoted per clip · usage-based |
| kling-o3-pro-image-to-video | quoted per clip · usage-based |
| kling-o3-pro-reference-to-video | quoted per clip · usage-based |
| kling-o3-pro-text-to-video | quoted per clip · usage-based |
| kling-o3-standard-image-to-video | quoted per clip · usage-based |
| kling-o3-standard-reference-to-video | quoted per clip · usage-based |
| kling-o3-standard-text-to-video | quoted per clip · usage-based |
| kling-v3-4k-reference-to-video | quoted per clip · usage-based |
| kling-v3-4k-text-to-video | quoted per clip · usage-based |
| kling-v3-pro-image-to-video | quoted per clip · usage-based |
| kling-v3-pro-motion-control | quoted per clip · usage-based |
| kling-v3-pro-text-to-video | quoted per clip · usage-based |
| kling-v3-standard-image-to-video | quoted per clip · usage-based |
| kling-v3-standard-motion-control | quoted per clip · usage-based |
| kling-v3-standard-text-to-video | quoted per clip · usage-based |
| longcat-distilled-image-to-video | quoted per clip · usage-based |
| longcat-distilled-text-to-video | quoted per clip · usage-based |
| longcat-image-to-video | quoted per clip · usage-based |
| longcat-text-to-video | quoted per clip · usage-based |
| ltx-2-19b-distilled-image-to-video | quoted per clip · usage-based |
| ltx-2-19b-distilled-text-to-video | quoted per clip · usage-based |
| ltx-2-19b-full-image-to-video | quoted per clip · usage-based |
| ltx-2-19b-full-text-to-video | quoted per clip · usage-based |
| ltx-2-fast-image-to-video | quoted per clip · usage-based |
| ltx-2-fast-text-to-video | quoted per clip · usage-based |
| ltx-2-full-image-to-video | quoted per clip · usage-based |
| ltx-2-full-text-to-video | quoted per clip · usage-based |
| ltx-2-v2-3-fast-image-to-video | quoted per clip · usage-based |
| ltx-2-v2-3-fast-text-to-video | quoted per clip · usage-based |
| ltx-2-v2-3-full-image-to-video | quoted per clip · usage-based |
| ltx-2-v2-3-full-text-to-video | quoted per clip · usage-based |
| ovi-image-to-video | quoted per clip · usage-based |
| pixverse-c1-image-to-video | quoted per clip · usage-based |
| pixverse-c1-reference-to-video | quoted per clip · usage-based |
| pixverse-c1-text-to-video | quoted per clip · usage-based |
| pixverse-c1-transition | quoted per clip · usage-based |
| pixverse-v5.6-image-to-video | quoted per clip · usage-based |
| pixverse-v5.6-text-to-video | quoted per clip · usage-based |
| pixverse-v5.6-transition | quoted per clip · usage-based |
| runway-gen4-5 | quoted per clip · usage-based |
| runway-gen4-5-text | quoted per clip · usage-based |
| runway-gen4-aleph | quoted per clip · usage-based |
| runway-gen4-turbo | quoted per clip · usage-based |
| seedance-1-5-pro-image-to-video | quoted per clip · usage-based |
| seedance-1-5-pro-text-to-video | quoted per clip · usage-based |
| seedance-2-0-enhanced-reference-to-video | quoted per clip · usage-based |
| seedance-2-0-enhanced-text-to-video | quoted per clip · usage-based |
| seedance-2-0-fast-image-to-video | quoted per clip · usage-based |
| seedance-2-0-fast-reference-to-video | quoted per clip · usage-based |
| seedance-2-0-fast-text-to-video | quoted per clip · usage-based |
| seedance-2-0-image-to-video | quoted per clip · usage-based |
| seedance-2-0-reference-to-video | quoted per clip · usage-based |
| seedance-2-0-text-to-video | quoted per clip · usage-based |
| sora-2-image-to-video | quoted per clip · usage-based |
| sora-2-pro-image-to-video | quoted per clip · usage-based |
| sora-2-pro-text-to-video | quoted per clip · usage-based |
| sora-2-text-to-video | quoted per clip · usage-based |
| topaz-video-upscale | quoted per clip · usage-based |
| veo3-fast-image-to-video | quoted per clip · usage-based |
| veo3-fast-text-to-video | quoted per clip · usage-based |
| veo3-full-image-to-video | quoted per clip · usage-based |
| veo3-full-text-to-video | quoted per clip · usage-based |
| veo3.1-fast-image-to-video | quoted per clip · usage-based |
| veo3.1-fast-text-to-video | quoted per clip · usage-based |
| veo3.1-full-image-to-video | quoted per clip · usage-based |
| veo3.1-full-text-to-video | quoted per clip · usage-based |
| vidu-q3-image-to-video | quoted per clip · usage-based |
| vidu-q3-text-to-video | quoted per clip · usage-based |
| wan-2-7-image-to-video | quoted per clip · usage-based |
| wan-2-7-reference-to-video | quoted per clip · usage-based |
| wan-2-7-text-to-video | quoted per clip · usage-based |
| wan-2-7-uncensored-image-to-video | quoted per clip · usage-based |
| wan-2-7-uncensored-text-to-video | quoted per clip · usage-based |
| wan-2-7-video-to-video | quoted per clip · usage-based |
| wan-2.1-pro-image-to-video | quoted per clip · usage-based |
| wan-2.2-a14b-text-to-video | quoted per clip · usage-based |
| wan-2.5-preview-image-to-video | quoted per clip · usage-based |
| wan-2.5-preview-text-to-video | quoted per clip · usage-based |
| wan-2.6-flash-image-to-video | quoted per clip · usage-based |
| wan-2.6-image-to-video | quoted per clip · usage-based |
| wan-2.6-text-to-video | quoted per clip · usage-based |
Text to speech · 11
| Model | Price (incl. markup) |
|---|---|
| tts-chatterbox-hd | $75.00 / 1M chars |
| tts-elevenlabs-turbo-v2-5 | $93.75 / 1M chars |
| tts-gemini-3-1-flash | $281.25 / 1M chars |
| tts-gradium-v1 | $71.25 / 1M chars |
| tts-inworld-1-5-max | $18.75 / 1M chars |
| tts-kokoro | $5.25 / 1M chars |
| tts-minimax-speech-02-hd | $187.50 / 1M chars |
| tts-orpheus | $93.75 / 1M chars |
| tts-qwen3-0-6b | $131.25 / 1M chars |
| tts-qwen3-1-7b | $168.75 / 1M chars |
| tts-xai-v1 | $28.13 / 1M chars |
Music · 11
| Model | Price (incl. markup) |
|---|---|
| ace-step-15 | see console |
| elevenlabs-music | see console |
| elevenlabs-sound-effects-v2 | see console |
| elevenlabs-tts-multilingual-v2 | see console |
| elevenlabs-tts-v3 | see console |
| lyria-3-pro | $0.15 / track |
| minimax-music-v2 | $0.0600 / track |
| minimax-music-v25 | $0.36 / track |
| minimax-music-v26 | $0.36 / track |
| mmaudio-v2-text-to-audio | see console |
| stable-audio-25 | $0.36 / track |
Speech to text · 5
| Model | Price (incl. markup) |
|---|---|
| elevenlabs/scribe-v2 | see console |
| fal-ai/wizper | see console |
| nvidia/parakeet-tdt-0.6b-v3 | see console |
| openai/whisper-large-v3 | see console |
| stt-xai-v1 | see console |
Embeddings · 9
| Model | Price (incl. markup) |
|---|---|
| gemini-embedding-2-preview | $0.38 / 1M tok |
| text-embedding-3-large | $0.24 / 1M tok |
| text-embedding-3-small | $0.0375 / 1M tok |
| text-embedding-bge-en-icl | $0.0188 / 1M tok |
| text-embedding-bge-m3 | $0.22 / 1M tok |
| text-embedding-multilingual-e5-large-instruct | $0.0188 / 1M tok |
| text-embedding-nemotron-embed-vl-1b-v2 | $0.0188 / 1M tok |
| text-embedding-qwen3-0-6b | $0.0188 / 1M tok |
| text-embedding-qwen3-8b | $0.0188 / 1M tok |
Upscale · 1
| Model | Price (incl. markup) |
|---|---|
| upscaler | from $0.0300 |
Chat completions
/v1/chat/completionsOpenAI chat-completions shape. Standard sampling parameters (temperature, top_p, stop, …) are accepted and forwarded.
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model id to use. |
| messages | array | required | Array of { role, content } messages (system / user / assistant). |
| max_tokens | integer | optional | Caps output length. Also bounds the worst-case amount reserved against your balance — set it. |
| max_completion_tokens | integer | optional | Alias for max_tokens. |
| temperature | number | optional | 0–2 sampling temperature. |
| top_p | number | optional | Nucleus sampling. |
Embeddings
/v1/embeddingsVectorize text for search and retrieval.
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | required | Embedding model id. |
| input | string | string[] | required | Text, or an array of texts, to embed. |
| dimensions | integer | optional | Requested output dimensionality, if the model supports it. |
| encoding_format | string | optional | "float" (default) or "base64". |
Images
/v1/images/generations/v1/image/generateGenerate images from a prompt. The OpenAI-style /images/generations and the native /image/generate both work; price scales with resolution and quality.
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | required | Image model id. |
| prompt | string | required | Text prompt. |
| size | string | optional | e.g. "1024x1024", "2048x2048", "4096x4096" — maps to a 1K/2K/4K tier. |
| resolution | string | optional | "1K" | "2K" | "4K" — alternative to size. |
| quality | string | optional | "low" | "medium" | "high". |
Text to speech
/v1/audio/speechSynthesize speech. The response body is the audio stream (e.g. audio/mpeg).
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | required | TTS model id. |
| input | string | required | Text to synthesize. |
| voice | string | optional | Voice id. |
| response_format | string | optional | e.g. "mp3", "wav", "opus". |
| speed | number | optional | Playback speed multiplier. |
Audio & video (async)
/v1/audio/queue · /v1/video/queue/v1/audio/retrieve · /v1/video/retrieve/v1/video/download/:idLong-running generations are queued, then polled. The queue call returns a queue_id and an up-front quote_usd that is held against your balance and finalized when the job completes. Finished media streams through NightVeil — the upstream storage URL is never exposed.
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model id (on queue and retrieve). |
| prompt | string | required | Generation prompt (queue). |
| duration | integer | optional | Video length in seconds (video queue; default 5). |
| resolution | string | optional | e.g. "720p", "1080p" (video queue). |
| aspect_ratio | string | optional | e.g. "16:9" (video queue). |
| audio | boolean | optional | Generate an audio track (video queue). |
| queue_id | string | required | The id returned by queue, used on retrieve. |
/retrieve until status is COMPLETED (then fetch via the returned download path) or a terminal failure. 404 JOB_NOT_FOUND means the queue_id isn't owned by your account.Billing & balance
/v1/deposit-addressYou prepay; every request is metered per token and debited from your balance automatically. Fund it two ways:
| Field | Type | Required | Description |
|---|---|---|---|
| Crypto | USDC on Base | optional | GET /v1/deposit-address returns your personal address. Deposits credit after on-chain confirmation. |
| Card | Stripe | optional | Top up by card from your console (where enabled). |
402 INSUFFICIENT_BALANCE before any upstream work or charge — so your balance is a hard spend ceiling.Errors
Errors return a JSON envelope with a stable code, a human message, a type, and a request_id to quote to support.
| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_MODEL · VALIDATION | Unknown model, or a malformed request body. |
| 401 | AUTHENTICATION_FAILED | Missing, malformed, or revoked API key. |
| 402 | INSUFFICIENT_BALANCE | The request would exceed your balance. Top up. Rejected before any spend. |
| 403 | CONTENT_TIER_FORBIDDEN | An uncensored model was requested with a standard-tier key. |
| 403 | AGE_VERIFICATION_REQUIRED | Uncensored access needs an age-verified account; resellers carry this by agreement. |
| 404 | JOB_NOT_FOUND | Unknown queue_id / job, or not owned by your account. |
| 422 | CONTENT_BLOCKED | Blocked by content policy. |
| 429 | RATE_LIMITED | Too many requests (reserved; balance is the primary limit today). |
| 502 | UPSTREAM_ERROR | Upstream provider error. Safe to retry. |
| 500 | INTERNAL | Unexpected server error. Retry; contact support with the request_id. |
Limits & reliability
| Field | Type | Required | Description |
|---|---|---|---|
| Spend control | balance | optional | Your prepaid balance is the ceiling — 402 before any spend. Set max_tokens to bound per-request cost. |
| Idempotency | per request | optional | Each call is metered once. Async jobs are charged once, on completion. |
| request_id | every response | optional | Every error carries a request_id; include it in support requests. |
| Streaming | roadmap | optional | Responses are buffered today; SSE streaming is coming. |
| Retries | 5xx / network | optional | 502 and network errors are safe to retry with backoff. 4xx are not. |
Prefer tools over raw HTTP? The official @nightveil/mcp server exposes every endpoint as tools in Claude Code, Cursor, and any MCP client — install instructions and a downloadable, LLM-ready API reference live at nightveil.ai/developers.
Need higher throughput, dedicated capacity, or to resell NightVeil under your own brand and base URL? Reach out from your console or at [email protected].
Reseller API
Resell NightVeil on a wholesale basis: pre-fund one balance, mint a key per customer, and build your own product. All your keys draw on your wholesale balance at the wholesale rate; you bill your customers off-platform — we never touch their money. Authenticate the management endpoints with an admin-scope key (from your reseller console).
/v1/keys/v1/keys/v1/keys/:id/v1/usage| Field | Type | Required | Description |
|---|---|---|---|
| label | string | optional | Your own identifier for the key (e.g. your customer's id). Returned in usage. |
| content_tier | string | optional | "sfw" (default) or "uncensored" — you carry age assurance for your users. |