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.09 / 1M$0.45 / 1M
deepseek-r1-70bDeep math / logic / code$0.10 / 1M$0.40 / 1M
gemma3-27bFast, high-volume everyday$0.05 / 1M$0.20 / 1M
qwen3-32bStrong all-round dense model$0.10 / 1M$0.40 / 1M
qwen3-coder-30bFast coding specialist (MoE)$0.10 / 1M$0.40 / 1M
glm-4.5-airDeep reasoning, 106B MoE — /nothink to disable thinking$0.09 / 1M$0.45 / 1M
whisper-large-v3Speech-to-text$0.0048 / 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
wan-2.2-t2vText-to-video (fast)$0.05 / second of video
ltx-2.3Best-quality video (22B)$0.05 / second of video

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":"gemma3-27b","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.

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 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:

ModeHow to invoke
Text → video + audioprompt only (audio synthesized from the prompt)
Image → videoan "image" field (base64 or data URL) — seeds the first frame
Keyframes → videoa "conditioning" array — anchor multiple images at chosen frames (first+last, or N-keyframe morphs)

Request parameters — everything the endpoint accepts:

FieldTypeDefaultNotes
promptstringrequiredScene description. With LTX audio on, spoken lines come from the prompt, e.g. a woman says: welcome.
modelstringltx-2.3The 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).
secondsnumber3Clip length, up to 5. Billing is $0.05 × seconds.
resolutionstring480p480p, 720p, or 1080p (1080p renders 1920×1056 and takes a few minutes longer).
imagestringBase64 or data URL; seeds the first frame (both models).
conditioningarrayLTX only. Up to 6 keyframes {"data", "frame", "strength"}; frame snaps to the 8-frame stride, strength is 0–1. Overrides image.
audiobooleantrueLTX 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}
    ]
  }'
Pricing: $0.05 per second of output. Up to 5 seconds, up to 1080p. 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);