reinforce42 API
Frontier open models served from private NVIDIA DGX hardware. Your prompts never touch a third-party cloud. The API mirrors the OpenAI spec, so any OpenAI SDK works by changing one line — the base URL.
Authentication
Every request needs your API key in the Authorization header as a bearer token. Keys are metered against a prepaid balance; you can view and top up yours in the account portal.
Authorization: Bearer sk-your-api-key
Quickstart
Send your first chat completion. Reasoning models spend tokens thinking, so set a generous max_tokens.
curl https://api.reinforce42.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss-120b",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Models & pricing
Prices are drawn from your credit balance exactly as you use them — no minimums, no rounding.
| Model | Best for | Input | Output |
|---|---|---|---|
gpt-oss-120b | Flagship reasoning & tool use | $0.09 / 1M | $0.45 / 1M |
deepseek-r1-70b | Deep math / logic / code | $0.10 / 1M | $0.40 / 1M |
gemma3-27b | Fast, high-volume everyday | $0.05 / 1M | $0.20 / 1M |
qwen3-32b | Strong all-round dense model | $0.10 / 1M | $0.40 / 1M |
qwen3-coder-30b | Fast coding specialist (MoE) | $0.10 / 1M | $0.40 / 1M |
glm-4.5-air | Deep reasoning, 106B MoE — /nothink to disable thinking | $0.09 / 1M | $0.45 / 1M |
whisper-large-v3 | Speech-to-text | $0.0048 / audio minute | |
whisper-large-v3-turbo | Faster speech-to-text | $0.0036 / audio minute | |
flux-schnell | Fast text-to-image | $0.02 / image | |
flux-dev | Best-quality text-to-image | $0.02 / image | |
wan-2.2-t2v | Text-to-video (fast) | $0.05 / second of video | |
ltx-2.3 | Best-quality video (22B) | $0.05 / second of video | |
List available models programmatically:
GET /v1/models
Chat completions
OpenAI-compatible. Supports messages, max_tokens, temperature, top_p, stream, stop, and tool calling.
| Field | Type | Notes |
|---|---|---|
model | string | Required. One of the models above. |
messages | array | Required. Roles: system, user, assistant. |
max_tokens | int | Use ≥256 for reasoning models — thinking consumes tokens. |
stream | bool | Server-sent events, token by token. |
# streaming
curl https://api.reinforce42.com/v1/chat/completions \
-H "Authorization: Bearer sk-your-api-key" \
-d '{"model":"gemma3-27b","stream":true,"messages":[{"role":"user","content":"Write a haiku."}]}'
Transcription (speech-to-text)
Turn call recordings and audio into text with whisper-large-v3 — or whisper-large-v3-turbo for faster, near-identical results. Send the audio as multipart form data. Use response_format=json or text.
curl https://api.reinforce42.com/v1/audio/transcriptions \
-H "Authorization: Bearer sk-your-api-key" \
-F "file=@call-recording.mp3" \
-F "model=whisper-large-v3" \
-F "response_format=json"
Image generation
Text-to-image with flux-schnell (fast, 4-step — the default) or flux-dev (best quality, 20-step). Pass "model" to choose. Returns a base64 PNG.
curl https://api.reinforce42.com/v1/images/generations \
-H "Authorization: Bearer sk-your-api-key" \
-d '{"model":"flux-dev","prompt":"a red fox in a snowy forest, golden hour","size":"1024x1024"}'
# -> {"created":..., "data":[{"b64_json":"iVBORw0KG..."}]}
Video generation
Video on our own DGX hardware. Two models — ltx-2.3 (best quality, 22B, synchronized audio — the default) and wan-2.2 (fast, silent). Choose with "model", resolution with "resolution" (480p, 720p, or 1080p). LTX-2.3 generates synchronized audio (voice + ambient sound) by default — pass "audio": false for a silent clip. It accepts several input modes:
| Mode | How to invoke |
|---|---|
| Text → video + audio | prompt only (audio synthesized from the prompt) |
| Image → video | an "image" field (base64 or data URL) — seeds the first frame |
| Keyframes → video | a "conditioning" array — anchor multiple images at chosen frames (first+last, or N-keyframe morphs) |
Request parameters — everything the endpoint accepts:
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string | required | Scene description. With LTX audio on, spoken lines come from the prompt, e.g. a woman says: welcome. |
model | string | ltx-2.3 | The default: best quality + synchronized audio. Pass wan-2.2 for the faster silent model (it switches to image-to-video automatically when image is present). |
seconds | number | 3 | Clip length, up to 5. Billing is $0.05 × seconds. |
resolution | string | 480p | 480p, 720p, or 1080p (1080p renders 1920×1056 and takes a few minutes longer). |
image | string | — | Base64 or data URL; seeds the first frame (both models). |
conditioning | array | — | LTX only. Up to 6 keyframes {"data", "frame", "strength"}; frame snaps to the 8-frame stride, strength is 0–1. Overrides image. |
audio | boolean | true | LTX only. Synchronized voice + ambient audio; false renders a silent clip. |
Sampler internals (steps, seed, guidance) are not exposed — each model runs at its tuned quality/speed design point.
Generation takes a couple of minutes, so this is an async job API: submit, poll, then download the MP4 (with its audio track).
# 1. submit
curl https://api.reinforce42.com/v1/video/generations \
-H "Authorization: Bearer sk-your-api-key" \
-d '{"model":"ltx-2.3","prompt":"a woman says: welcome to monkey, warm studio lighting","seconds":3,"resolution":"720p"}'
# -> {"id":"vid_abc","status":"queued","estimated_cost":0.15}
# 2. poll until status is "completed"
curl https://api.reinforce42.com/v1/video/generations/vid_abc \
-H "Authorization: Bearer sk-your-api-key"
# -> {"status":"completed","video_url":"/v1/video/download/vid_abc.mp4"}
# 3. download the clip
curl -O https://api.reinforce42.com/v1/video/download/vid_abc.mp4
Keyframe conditioning (LTX-2.3) — anchor images at frames (frame 0 = first; positions snap to LTX's 8-frame stride; up to 6 keyframes). strength is 0–1. A single image field is shorthand for one keyframe at frame 0.
curl https://api.reinforce42.com/v1/video/generations \
-H "Authorization: Bearer sk-your-api-key" \
-d '{
"model": "ltx-2.3",
"prompt": "the scene morphs from dawn to dusk, cinematic",
"seconds": 4,
"conditioning": [
{"data": "data:image/png;base64,…", "frame": 0, "strength": 1.0},
{"data": "data:image/png;base64,…", "frame": 96, "strength": 1.0}
]
}'
Errors & limits
Standard HTTP status codes. Bodies follow the OpenAI error shape: {"error": {"message": "...", "code": "..."}}.
| Status | Meaning |
|---|---|
401 | Missing or invalid API key. |
429 | Rate limit hit, or your credit balance is exhausted — top up in the portal. |
400 | Malformed request (e.g. unsupported response_format). |
500 / 503 | Transient server issue — the gateway auto-retries and fails over between backends. |
Rate limits are per key (requests/min). Reliability is built in: failed calls retry automatically and unhealthy backends are taken out of rotation.
Credits & billing
reinforce42 is prepaid. Buy a credit pack and your balance is drawn down per token or audio minute. Manage everything in the account portal: live balance, usage, billing history, and top-ups.
| Pack | Price | Credit |
|---|---|---|
| Starter | $10 | $10 |
| Builder | $25 | $27 +8% |
| Scale | $100 | $115 +15% |
Free trial & auto-recharge
New here? Start free — add a card and get $10 in free credit to try everything. No charge until you've used it up. When your balance runs low, we automatically charge your saved card $10 and top you up so your app never stops. Turn it off any time in the portal.
SDKs
Any OpenAI-compatible client works. Point the base URL at reinforce42.
Python
from openai import OpenAI
client = OpenAI(base_url="https://api.reinforce42.com/v1", api_key="sk-your-api-key")
r = client.chat.completions.create(model="gpt-oss-120b",
messages=[{"role":"user","content":"Hello!"}])
print(r.choices[0].message.content)
JavaScript / TypeScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.reinforce42.com/v1", apiKey: "sk-your-api-key" });
const r = await client.chat.completions.create({ model: "gpt-oss-120b",
messages: [{ role: "user", content: "Hello!" }] });
console.log(r.choices[0].message.content);