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.05 / 1M | $0.24 / 1M |
llama3-8b | Cheapest — classification, drafts | $0.02 / 1M | $0.05 / 1M |
qwen3.6-35b-a3b | Fastest general model — sub-2s replies, 256K context | $0.05 / 1M | $0.70 / 1M |
qwen3-coder-30b | Fast coding specialist (MoE) | $0.07 / 1M | $0.25 / 1M |
whisper-large-v3 | Speech-to-text | $0.0048 / audio minute | |
whisper-large-v3-diarize | Speech-to-text with speaker labels | $0.006 / audio minute | |
whisper-large-v3-turbo-diarize | Faster diarized speech-to-text | $0.0054 / 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 | |
minimax-h3-fast | Video with native audio (default) | $0.05 / second of video | |
minimax-h3 | Best-quality video with native audio | $0.05 / second of video | |
OpenAI-compatible aliases. If you are migrating an existing
OpenAI client, these model names are accepted and are served by our own models —
they are aliases, not the vendors' models:
whisper-1 → whisper-large-v3-turbo,
gpt-4o and gpt-3.5-turbo → qwen3.6-35b-a3b.
Billing follows the target model's price.
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":"qwen3.6-35b-a3b","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"
Speaker diarization
Append -diarize to either whisper model to get speaker-labeled segments — who said what, with timestamps. The response adds a segments array (speaker_a, speaker_b, …), compatible with pipelines built on OpenAI's diarized transcription:
curl https://api.reinforce42.com/v1/audio/transcriptions \
-H "Authorization: Bearer sk-your-api-key" \
-F file=@call.mp3 -F model=whisper-large-v3-turbo-diarize
# -> {"text":"...","segments":[
# {"id":0,"speaker":"speaker_a","start":0.3,"end":4.2,"text":"Hi, thanks for calling..."},
# {"id":1,"speaker":"speaker_b","start":5.4,"end":11.8,"text":"Yeah hi, I saw your pricing..."}]}
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 with native, synchronized sound (dialogue, ambience, music) on our own DGX hardware with MiniMax H3. Two tiers: minimax-h3-fast (default) and minimax-h3 (best quality, about twice as slow). Clips run 5–15 seconds at 480p (832×480) or 768p (1344×768).
| Mode | How to invoke |
|---|---|
| Text → video | prompt only |
| Image → video | "first_frame" (or "image") — seeds the first frame; add "last_frame" to set where it ends |
| Reference → video | "ref_images" (up to 9), "ref_videos" (up to 3), "ref_audios" (up to 3); refer to them in the prompt as <Picture 1>, <Video 1>, <Audio 1>. Not combinable with first/last frame. |
Request parameters — everything the endpoint accepts:
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string | required | Scene description. |
model | string | minimax-h3-fast | minimax-h3-fast or minimax-h3. Older video model names run on minimax-h3-fast. |
seconds | number | 5 | Clip length, 5–15. Billing is $0.05 × seconds. |
resolution | string | 480p | 480p or 768p. 720p and 1080p are accepted and render at 768p; the response shows the actual size. |
first_frame / image | string | — | Base64, data URL, or public https URL; seeds the first frame. |
last_frame | string | — | Same formats; the frame the clip ends on. |
ref_images / ref_videos / ref_audios | array | — | Reference media (same formats, 200 MB each; videos and audio 2–15 s). Reference jobs on minimax-h3-fast render at 480p. |
Sampler internals (steps, seed, guidance) are not exposed — the model runs at its tuned quality/speed design point.
Generation takes several minutes, so this is an async job API: submit, poll, then download the MP4. Typical times on minimax-h3-fast: 5 s at 768p ≈ 5 min, 10 s at 768p ≈ 11 min, 15 s at 480p ≈ 5 min. minimax-h3 takes about twice as long (15 s at 768p can take 40 min). Jobs run one at a time, so check queue_position while polling.
# 1. submit
curl https://api.reinforce42.com/v1/video/generations \
-H "Authorization: Bearer sk-your-api-key" \
-d '{"model":"minimax-h3-fast","prompt":"a red fox trots through fresh snow at dawn, soft crunching footsteps, cinematic","seconds":5,"resolution":"768p"}'
# -> {"id":"vid_abc","status":"queued","resolution":"1344x768","estimated_cost":0.25}
# 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
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);