Developers

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).

base URL
https://nightveil.ai/v1
FieldTypeRequiredDescription
ProtocolHTTPSrequiredTLS only. Plain HTTP is refused.
FormatJSONrequiredapplication/json request/response, except binary media downloads.
CompatibilityOpenAI v1requiredChat, embeddings, images, and audio mirror the OpenAI REST shapes.
StreamingbufferedoptionalResponses 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.

header
Authorization: Bearer nv_your_key_here

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.

python
from openai import OpenAI

client = OpenAI(base_url="https://nightveil.ai/v1", api_key="nv_your_key_here")

resp = client.chat.completions.create(
    model="veil-large",
    messages=[{"role": "user", "content": "Say it plainly."}],
    max_tokens=256,
)
print(resp.choices[0].message.content)
node.js
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nightveil.ai/v1", apiKey: process.env.NIGHTVEIL_API_KEY });

const r = await client.chat.completions.create({
  model: "veil-large",
  messages: [{ role: "user", content: "Say it plainly." }],
  max_tokens: 256,
});
console.log(r.choices[0].message.content);
curl
curl https://nightveil.ai/v1/chat/completions \
  -H "Authorization: Bearer nv_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veil-large",
    "messages": [
      { "role": "system", "content": "You are concise." },
      { "role": "user", "content": "Say it plainly." }
    ],
    "max_tokens": 256,
    "temperature": 0.7
  }'

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.

FieldTypeRequiredDescription
StandardtieroptionalDefault. Safe-for-work models. Any key works.
UncensoredtieroptionalUnfiltered models. Requires an uncensored-tier key. The account must be age-verified; resellers carry this by agreement. Mint the key in your console.
Calling an uncensored model with a standard-tier key returns 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

ModelPrice (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

ModelPrice (incl. markup)
bria-bg-remover$0.0450 / image
chroma$0.0150 / image
firered-image-editsee console
flux-2-max$0.14 / image
flux-2-max-editsee console
flux-2-pro$0.0600 / image
gpt-image-1-5$0.39 / image
gpt-image-1-5-editsee 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-editsee console
qwen-edit-uncensoredsee console
qwen-image$0.0450 / image
qwen-image-2$0.0750 / image
qwen-image-2-editsee console
qwen-image-2-pro$0.15 / image
qwen-image-2-pro-editsee console
recraft-v4$0.0750 / image
recraft-v4-pro$0.43 / image
seedream-v4$0.0750 / image
seedream-v4-editsee console
seedream-v5-lite$0.0750 / image
seedream-v5-lite-editsee console
veil-diffuse$0.0150 / image
wai-Illustrious$0.0150 / image
wan-2-7-pro-editsee 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

ModelPrice (incl. markup)
grok-imagine-1-5-image-to-video-privatequoted per clip · usage-based
grok-imagine-image-to-videoquoted per clip · usage-based
grok-imagine-image-to-video-privatequoted per clip · usage-based
grok-imagine-reference-to-videoquoted per clip · usage-based
grok-imagine-reference-to-video-privatequoted per clip · usage-based
grok-imagine-text-to-videoquoted per clip · usage-based
grok-imagine-text-to-video-privatequoted per clip · usage-based
grok-imagine-video-to-video-privatequoted per clip · usage-based
happyhorse-1-0-image-to-videoquoted per clip · usage-based
happyhorse-1-0-reference-to-videoquoted per clip · usage-based
happyhorse-1-0-text-to-videoquoted per clip · usage-based
happyhorse-1-0-video-to-videoquoted per clip · usage-based
kling-2.5-turbo-pro-image-to-videoquoted per clip · usage-based
kling-2.5-turbo-pro-text-to-videoquoted per clip · usage-based
kling-2.6-pro-image-to-videoquoted per clip · usage-based
kling-2.6-pro-text-to-videoquoted per clip · usage-based
kling-o3-4k-image-to-videoquoted per clip · usage-based
kling-o3-4k-reference-to-videoquoted per clip · usage-based
kling-o3-4k-text-to-videoquoted per clip · usage-based
kling-o3-pro-image-to-videoquoted per clip · usage-based
kling-o3-pro-reference-to-videoquoted per clip · usage-based
kling-o3-pro-text-to-videoquoted per clip · usage-based
kling-o3-standard-image-to-videoquoted per clip · usage-based
kling-o3-standard-reference-to-videoquoted per clip · usage-based
kling-o3-standard-text-to-videoquoted per clip · usage-based
kling-v3-4k-reference-to-videoquoted per clip · usage-based
kling-v3-4k-text-to-videoquoted per clip · usage-based
kling-v3-pro-image-to-videoquoted per clip · usage-based
kling-v3-pro-motion-controlquoted per clip · usage-based
kling-v3-pro-text-to-videoquoted per clip · usage-based
kling-v3-standard-image-to-videoquoted per clip · usage-based
kling-v3-standard-motion-controlquoted per clip · usage-based
kling-v3-standard-text-to-videoquoted per clip · usage-based
longcat-distilled-image-to-videoquoted per clip · usage-based
longcat-distilled-text-to-videoquoted per clip · usage-based
longcat-image-to-videoquoted per clip · usage-based
longcat-text-to-videoquoted per clip · usage-based
ltx-2-19b-distilled-image-to-videoquoted per clip · usage-based
ltx-2-19b-distilled-text-to-videoquoted per clip · usage-based
ltx-2-19b-full-image-to-videoquoted per clip · usage-based
ltx-2-19b-full-text-to-videoquoted per clip · usage-based
ltx-2-fast-image-to-videoquoted per clip · usage-based
ltx-2-fast-text-to-videoquoted per clip · usage-based
ltx-2-full-image-to-videoquoted per clip · usage-based
ltx-2-full-text-to-videoquoted per clip · usage-based
ltx-2-v2-3-fast-image-to-videoquoted per clip · usage-based
ltx-2-v2-3-fast-text-to-videoquoted per clip · usage-based
ltx-2-v2-3-full-image-to-videoquoted per clip · usage-based
ltx-2-v2-3-full-text-to-videoquoted per clip · usage-based
ovi-image-to-videoquoted per clip · usage-based
pixverse-c1-image-to-videoquoted per clip · usage-based
pixverse-c1-reference-to-videoquoted per clip · usage-based
pixverse-c1-text-to-videoquoted per clip · usage-based
pixverse-c1-transitionquoted per clip · usage-based
pixverse-v5.6-image-to-videoquoted per clip · usage-based
pixverse-v5.6-text-to-videoquoted per clip · usage-based
pixverse-v5.6-transitionquoted per clip · usage-based
runway-gen4-5quoted per clip · usage-based
runway-gen4-5-textquoted per clip · usage-based
runway-gen4-alephquoted per clip · usage-based
runway-gen4-turboquoted per clip · usage-based
seedance-1-5-pro-image-to-videoquoted per clip · usage-based
seedance-1-5-pro-text-to-videoquoted per clip · usage-based
seedance-2-0-enhanced-reference-to-videoquoted per clip · usage-based
seedance-2-0-enhanced-text-to-videoquoted per clip · usage-based
seedance-2-0-fast-image-to-videoquoted per clip · usage-based
seedance-2-0-fast-reference-to-videoquoted per clip · usage-based
seedance-2-0-fast-text-to-videoquoted per clip · usage-based
seedance-2-0-image-to-videoquoted per clip · usage-based
seedance-2-0-reference-to-videoquoted per clip · usage-based
seedance-2-0-text-to-videoquoted per clip · usage-based
sora-2-image-to-videoquoted per clip · usage-based
sora-2-pro-image-to-videoquoted per clip · usage-based
sora-2-pro-text-to-videoquoted per clip · usage-based
sora-2-text-to-videoquoted per clip · usage-based
topaz-video-upscalequoted per clip · usage-based
veo3-fast-image-to-videoquoted per clip · usage-based
veo3-fast-text-to-videoquoted per clip · usage-based
veo3-full-image-to-videoquoted per clip · usage-based
veo3-full-text-to-videoquoted per clip · usage-based
veo3.1-fast-image-to-videoquoted per clip · usage-based
veo3.1-fast-text-to-videoquoted per clip · usage-based
veo3.1-full-image-to-videoquoted per clip · usage-based
veo3.1-full-text-to-videoquoted per clip · usage-based
vidu-q3-image-to-videoquoted per clip · usage-based
vidu-q3-text-to-videoquoted per clip · usage-based
wan-2-7-image-to-videoquoted per clip · usage-based
wan-2-7-reference-to-videoquoted per clip · usage-based
wan-2-7-text-to-videoquoted per clip · usage-based
wan-2-7-uncensored-image-to-videoquoted per clip · usage-based
wan-2-7-uncensored-text-to-videoquoted per clip · usage-based
wan-2-7-video-to-videoquoted per clip · usage-based
wan-2.1-pro-image-to-videoquoted per clip · usage-based
wan-2.2-a14b-text-to-videoquoted per clip · usage-based
wan-2.5-preview-image-to-videoquoted per clip · usage-based
wan-2.5-preview-text-to-videoquoted per clip · usage-based
wan-2.6-flash-image-to-videoquoted per clip · usage-based
wan-2.6-image-to-videoquoted per clip · usage-based
wan-2.6-text-to-videoquoted per clip · usage-based

Text to speech · 11

ModelPrice (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

ModelPrice (incl. markup)
ace-step-15see console
elevenlabs-musicsee console
elevenlabs-sound-effects-v2see console
elevenlabs-tts-multilingual-v2see console
elevenlabs-tts-v3see 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-audiosee console
stable-audio-25$0.36 / track

Speech to text · 5

ModelPrice (incl. markup)
elevenlabs/scribe-v2see console
fal-ai/wizpersee console
nvidia/parakeet-tdt-0.6b-v3see console
openai/whisper-large-v3see console
stt-xai-v1see console

Embeddings · 9

ModelPrice (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

ModelPrice (incl. markup)
upscalerfrom $0.0300

Chat completions

POST/v1/chat/completions

OpenAI chat-completions shape. Standard sampling parameters (temperature, top_p, stop, …) are accepted and forwarded.

FieldTypeRequiredDescription
modelstringrequiredModel id to use.
messagesarrayrequiredArray of { role, content } messages (system / user / assistant).
max_tokensintegeroptionalCaps output length. Also bounds the worst-case amount reserved against your balance — set it.
max_completion_tokensintegeroptionalAlias for max_tokens.
temperaturenumberoptional0–2 sampling temperature.
top_pnumberoptionalNucleus sampling.
response · 200
{
  "id": "cmpl_8f3a…",
  "object": "chat.completion",
  "model": "veil-large",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Done." },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 19, "completion_tokens": 2, "total_tokens": 21 }
}

Embeddings

POST/v1/embeddings

Vectorize text for search and retrieval.

FieldTypeRequiredDescription
modelstringrequiredEmbedding model id.
inputstring | string[]requiredText, or an array of texts, to embed.
dimensionsintegeroptionalRequested output dimensionality, if the model supports it.
encoding_formatstringoptional"float" (default) or "base64".
curl
curl https://nightveil.ai/v1/embeddings \
  -H "Authorization: Bearer nv_your_key_here" -H "Content-Type: application/json" \
  -d '{ "model": "veil-embed", "input": "the night is private" }'
response · 200
{
  "object": "list",
  "model": "veil-embed",
  "data": [{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.044, …] }],
  "usage": { "prompt_tokens": 4, "total_tokens": 4 }
}

Images

POST/v1/images/generations
POST/v1/image/generate

Generate images from a prompt. The OpenAI-style /images/generations and the native /image/generate both work; price scales with resolution and quality.

FieldTypeRequiredDescription
modelstringrequiredImage model id.
promptstringrequiredText prompt.
sizestringoptionale.g. "1024x1024", "2048x2048", "4096x4096" — maps to a 1K/2K/4K tier.
resolutionstringoptional"1K" | "2K" | "4K" — alternative to size.
qualitystringoptional"low" | "medium" | "high".
curl
curl https://nightveil.ai/v1/images/generations \
  -H "Authorization: Bearer nv_your_key_here" -H "Content-Type: application/json" \
  -d '{ "model": "veil-diffuse-xl", "prompt": "a veiled moon", "size": "1024x1024", "quality": "high" }'
response · 200
{
  "id": "img_2b…",            // re-minted by NightVeil; never the upstream id
  "images": ["<base64 or url>"],
  "created": 1733961600
}

Text to speech

POST/v1/audio/speech

Synthesize speech. The response body is the audio stream (e.g. audio/mpeg).

FieldTypeRequiredDescription
modelstringrequiredTTS model id.
inputstringrequiredText to synthesize.
voicestringoptionalVoice id.
response_formatstringoptionale.g. "mp3", "wav", "opus".
speednumberoptionalPlayback speed multiplier.
curl
curl https://nightveil.ai/v1/audio/speech \
  -H "Authorization: Bearer nv_your_key_here" -H "Content-Type: application/json" \
  -d '{ "model": "veil-voice", "input": "Hello from behind the veil.", "voice": "alloy" }' \
  --output speech.mp3

Audio & video (async)

POST/v1/audio/queue · /v1/video/queue
POST/v1/audio/retrieve · /v1/video/retrieve
GET/v1/video/download/:id

Long-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.

FieldTypeRequiredDescription
modelstringrequiredModel id (on queue and retrieve).
promptstringrequiredGeneration prompt (queue).
durationintegeroptionalVideo length in seconds (video queue; default 5).
resolutionstringoptionale.g. "720p", "1080p" (video queue).
aspect_ratiostringoptionale.g. "16:9" (video queue).
audiobooleanoptionalGenerate an audio track (video queue).
queue_idstringrequiredThe id returned by queue, used on retrieve.
lifecycle
# 1 — enqueue
curl https://nightveil.ai/v1/video/queue \
  -H "Authorization: Bearer nv_your_key_here" -H "Content-Type: application/json" \
  -d '{ "model": "veil-motion", "prompt": "rain on neon", "duration": 5, "resolution": "720p" }'
# → { "id": "job_…", "queue_id": "q_123", "status": "QUEUED", "quote_usd": 0.42 }

# 2 — poll until terminal
curl https://nightveil.ai/v1/video/retrieve \
  -H "Authorization: Bearer nv_your_key_here" -H "Content-Type: application/json" \
  -d '{ "model": "veil-motion", "queue_id": "q_123" }'
# → { "status": "PROCESSING" }
# … then → { "status": "COMPLETED", "download_url": "/v1/video/download/job_…" }

# 3 — download (streamed through NightVeil; the upstream URL is never exposed)
curl https://nightveil.ai/v1/video/download/job_… -H "Authorization: Bearer nv_your_key_here" --output out.mp4
Poll /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

GET/v1/deposit-address

You prepay; every request is metered per token and debited from your balance automatically. Fund it two ways:

FieldTypeRequiredDescription
CryptoUSDC on BaseoptionalGET /v1/deposit-address returns your personal address. Deposits credit after on-chain confirmation.
CardStripeoptionalTop up by card from your console (where enabled).
curl
curl https://nightveil.ai/v1/deposit-address -H "Authorization: Bearer nv_your_key_here"
# → { "chain": "base", "asset": "usdc", "address": "0x…" }
A request that would exceed your balance is rejected with 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.

example · HTTP 402
{
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Balance 0.004 < estimate 0.01",
    "type": "billing",
    "request_id": "b1f2…"
  }
}
StatusCodeMeaning
400INVALID_MODEL · VALIDATIONUnknown model, or a malformed request body.
401AUTHENTICATION_FAILEDMissing, malformed, or revoked API key.
402INSUFFICIENT_BALANCEThe request would exceed your balance. Top up. Rejected before any spend.
403CONTENT_TIER_FORBIDDENAn uncensored model was requested with a standard-tier key.
403AGE_VERIFICATION_REQUIREDUncensored access needs an age-verified account; resellers carry this by agreement.
404JOB_NOT_FOUNDUnknown queue_id / job, or not owned by your account.
422CONTENT_BLOCKEDBlocked by content policy.
429RATE_LIMITEDToo many requests (reserved; balance is the primary limit today).
502UPSTREAM_ERRORUpstream provider error. Safe to retry.
500INTERNALUnexpected server error. Retry; contact support with the request_id.

Limits & reliability

FieldTypeRequiredDescription
Spend controlbalanceoptionalYour prepaid balance is the ceiling — 402 before any spend. Set max_tokens to bound per-request cost.
Idempotencyper requestoptionalEach call is metered once. Async jobs are charged once, on completion.
request_idevery responseoptionalEvery error carries a request_id; include it in support requests.
StreamingroadmapoptionalResponses are buffered today; SSE streaming is coming.
Retries5xx / networkoptional502 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).

POST/v1/keys
GET/v1/keys
DELETE/v1/keys/:id
GET/v1/usage
FieldTypeRequiredDescription
labelstringoptionalYour own identifier for the key (e.g. your customer's id). Returned in usage.
content_tierstringoptional"sfw" (default) or "uncensored" — you carry age assurance for your users.
mint a key for a customer
curl https://nightveil.ai/v1/keys \
  -H "Authorization: Bearer nv_admin_key" -H "Content-Type: application/json" \
  -d '{ "label": "customer-123" }'
# → { "id": "...", "key": "nv_…", "label": "customer-123" }
usage by key
curl https://nightveil.ai/v1/usage -H "Authorization: Bearer nv_admin_key"
# → { "total_billed_usd": 12.40, "by_key": [{ "api_key_id": "...", "label": "customer-123", "requests": 88, "billed_usd": 4.10 }] }
Minted keys are standard inference keys — give them to your customers or use them in your app; calls authenticate exactly like the rest of this API.