OpenRouter-style docs for the Blackmagic API.
Use one prepaid Blackmagic AI key with familiar chat completions, responses, messages, models, key-info, and selected image routes.
Base URL
Main-domain routes also work at https://blackmagic.engineering/api/v1. The API subdomain is the OpenAI SDK friendly base URL.
1. Buy credits
Top up prepaid credits before live calls. Credits sell 1:1 (1M = $1) at every pack size, with frontier models priced below provider list.
2. Create an API key
Generate a key, set an optional monthly spend limit, and store it server-side.
3. Use OpenAI-compatible clients
Set baseURL to the Blackmagic API base and keep Authorization: Bearer.
4. Track usage
Inspect credits, tokens, model, endpoint, status, latency, and key-level spend.
Bearer keys with credit limits.
Every request uses a Blackmagic AI key. Keys can have monthly spend limits and are billed against the user's remaining prepaid credits.
curl https://api.blackmagic.engineering/v1/key \
-H "Authorization: Bearer $BLACKMAGIC_API_KEY"POST /api/v1/chat/completions
The chat route accepts familiar OpenAI-style messages and returns the upstream response shape. Send stream:false so usage can be settled from provider usage fields.
curl https://api.blackmagic.engineering/v1/chat/completions \
-H "Authorization: Bearer $BLACKMAGIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [
{ "role": "user", "content": "Write a launch checklist." }
],
"stream": false,
"max_tokens": 300
}'Use the OpenAI SDK by changing baseURL.
This is the fastest migration path for teams already using OpenAI-compatible clients.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.blackmagic.engineering/v1",
apiKey: process.env.BLACKMAGIC_API_KEY
});
const completion = await client.chat.completions.create({
model: "claude-sonnet-4-6",
messages: [{ role: "user", content: "Explain our API pricing." }],
stream: false
});GET /api/v1/models
The models endpoint returns OpenRouter-style metadata: id, provider, architecture, context length, pricing, supported parameters, and the recommended endpoint. Listed prices are the charged rates — credits sell 1:1, so there are no hidden multipliers.
curl "https://api.blackmagic.engineering/v1/models?output_modalities=text"
curl "https://api.blackmagic.engineering/v1/models?output_modalities=image"GPT-5.5
$1.32/$7.92 per 1M tokens
Charged 1:1 against prepaid credits — 1M credits = $1.
GPT-5.3 Codex
$0.46/$3.7 per 1M tokens
Charged 1:1 against prepaid credits — 1M credits = $1.
Claude Opus 4.8
$1.76/$8.81 per 1M tokens
Charged 1:1 against prepaid credits — 1M credits = $1.
Claude Sonnet 4.6
$1.06/$5.28 per 1M tokens
Charged 1:1 against prepaid credits — 1M credits = $1.
Nano Banana
$0.02 per image
Charged 1:1 against prepaid credits — 1M credits = $1.
GPT Image 2
$0.10 per image
Charged 1:1 against prepaid credits — 1M credits = $1.
Generate selected images with the same key and credits.
Selected text-to-image models use the public image route and the same prepaid balance. Responses are passed through from the configured media provider.
curl https://api.blackmagic.engineering/v1/images/generations \
-H "Authorization: Bearer $BLACKMAGIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano_banana",
"prompt": "A clean API dashboard product screenshot",
"size": "1024x1024"
}'OpenAI-compatible chat endpoint for text models.
Responses-style text endpoint for compatible clients.
Claude-style messages endpoint.
Legacy text-completions endpoint.
Selected text-to-image generation endpoint.
List model metadata and prices.
Inspect the authenticated key, limits, and credit balance.
Billing is prepaid and usage-metered.
1M credits equals $1 of metered API usage. Credits burn against the listed model or media cost, while larger top-ups grant more credits per dollar. That makes Builder and Enterprise traffic cheaper without hiding the underlying model price.
Pay as you go
Base usage pricing for trying the gateway and testing integrations.
Builder
Frontier models up to ~75% below list, auto-recharge, and higher key limits.
Enterprise
Same transparent rates, procurement support, and private routing planning.
