Private inference · OpenAI-compatible

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.

Base URL  https://api.reinforce42.com/v1

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
Keep keys secret. Anyone with your key can spend your balance. Rotate a key any time from the portal or ask an admin to revoke it.

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.

ModelBest forInputOutput
gpt-oss-120bFlagship reasoning & tool use$0.05 / 1M$0.24 / 1M
llama3-8bCheapest — classification, drafts$0.02 / 1M$0.05 / 1M
qwen3.6-35b-a3bFastest general model — sub-2s replies, 256K context$0.05 / 1M$0.70 / 1M
qwen3-coder-30bFast coding specialist (MoE)$0.07 / 1M$0.25 / 1M
whisper-large-v3Speech-to-text$0.0048 / audio minute
whisper-large-v3-diarizeSpeech-to-text with speaker labels$0.006 / audio minute
whisper-large-v3-turbo-diarizeFaster diarized speech-to-text$0.0054 / audio minute
whisper-large-v3-turboFaster speech-to-text$0.0036 / audio minute
flux-schnellFast text-to-image$0.02 / image
flux-devBest-quality text-to-image$0.02 / image
minimax-h3-fastVideo with native audio (default)$0.05 / second of video
minimax-h3Best-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

POST/v1/chat/completions

OpenAI-compatible. Supports messages, max_tokens, temperature, top_p, stream, stop, and tool calling.

FieldTypeNotes
modelstringRequired. One of the models above.
messagesarrayRequired. Roles: system, user, assistant.
max_tokensintUse ≥256 for reasoning models — thinking consumes tokens.
streamboolServer-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)

POST/v1/audio/transcriptions

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"
Formats: mp3, wav, m4a, flac, ogg and more. Billed per audio minute. Speaker diarization ("who said what") is coming soon.

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

POST/v1/images/generations

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..."}]}
Pricing: $0.02 per image. Your prompt never leaves our hardware.

Video generation

POST/v1/video/generations

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

ModeHow to invoke
Text → videoprompt 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:

FieldTypeDefaultNotes
promptstringrequiredScene description.
modelstringminimax-h3-fastminimax-h3-fast or minimax-h3. Older video model names run on minimax-h3-fast.
secondsnumber5Clip length, 5–15. Billing is $0.05 × seconds.
resolutionstring480p480p or 768p. 720p and 1080p are accepted and render at 768p; the response shows the actual size.
first_frame / imagestring—Base64, data URL, or public https URL; seeds the first frame.
last_framestring—Same formats; the frame the clip ends on.
ref_images / ref_videos / ref_audiosarray—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
Pricing: $0.05 per second of output, 5–15 seconds, up to 768p, sound included. Clips are retained 14 days. Your inputs never leave our hardware.

Errors & limits

Standard HTTP status codes. Bodies follow the OpenAI error shape: {"error": {"message": "...", "code": "..."}}.

StatusMeaning
401Missing or invalid API key.
429Rate limit hit, or your credit balance is exhausted — top up in the portal.
400Malformed request (e.g. unsupported response_format).
500 / 503Transient 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.

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

Cards are handled entirely by Stripe — reinforce42 never sees your card number.

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