Docs

Build with Inferentium

An OpenAI-compatible speech-to-text API. Keep your client, change onebase_url.

Quickstart

1) Get an API key from the console. 2) Point your SDK at our base URL. 3) Transcribe.

Python
pip install openai

from openai import OpenAI
client = OpenAI(base_url="https://api.inferentium.ai/v1", api_key="tapi_...")

tx = client.audio.transcriptions.create(
    model="inferentium-stt-1",
    file=open("call.mp3", "rb"),
)
print(tx.text)

Base URL while we finish DNS

https://api.inferentium.ai/v1 is the address this API will settle on, but its DNS record is not published yet. Until it is, point your client at https://inferentium-gateway-1008585777323.us-central1.run.app/v1 — same API, same keys.

Authentication

Pass your API key as a Bearer token (or X-API-Key header). Keys are prefixed with tapi_and scoped to your account's prepaid credits.

curl
curl https://api.inferentium.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer tapi_..." \
  -F model="inferentium-stt-1" \
  -F file="@call.mp3"

OpenAI compatibility

We implement the standard /v1/audio/transcriptions shape. Set the base URL and key; everything else stays the same. Works with the official SDKs, LangChain, LlamaIndex, and anything that lets you override OPENAI_BASE_URL.

JavaScript / TypeScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.inferentium.ai/v1", apiKey: "tapi_..." });

const tx = await client.audio.transcriptions.create({
  model: "inferentium-stt-1",
  file: fs.createReadStream("call.mp3"),
});
console.log(tx.text);

Transcribe (synchronous)

Upload audio and get the transcript in the response. Best for clips and files up to a few hours. Parameters: file (required), model, language (auto-detected if omitted), diarize (optional).

Response
{
  "requestId": "req_...",
  "transcription": { "text": "Olá, boa noite. Sejam bem-vindos…", "language": "pt" },
  "metrics": { "audioDurationS": 5832.4, "realTimeFactor": 0.003 },
  "creditsChargedMicro": 24496000,
  "balanceMicroCredits": 9975504000
}

Async jobs & webhooks

For very long files or high volume, submit a job and get notified. Submit returns a jobId; poll the status, or receive a signed webhook when it's ready.

Submit → poll
POST https://api.inferentium.ai/api/v1/stt/jobs        # → 202 { jobId }
GET  https://api.inferentium.ai/api/v1/stt/jobs/{id}    # → { status }
GET  https://api.inferentium.ai/api/v1/stt/jobs/{id}/result

Webhooks are signed with HMAC-SHA256 in the X-Signature header (sha256=…). Verify it with your webhook secret before trusting the payload.

Errors

Every error uses the OpenAI envelope, so existing error handling keeps working. Each response carries x-request-id — quote it if you contact us.

Envelope
{ "error": { "message": "…", "type": "…", "param": null, "code": "…" } }
HTTPcodeWhen
401invalid_api_keyMissing, unknown or revoked key
402insufficient_creditsBalance cannot cover the estimate — top up
403insufficient_permissionsKey lacks stt:write
400invalid_valueBad parameter; srt/vtt not supported yet
413Body over 500 MB (no envelope — server default)
429rate_limit_exceededPer-key hourly limit; honour Retry-After
502inference_failedBackend failed or audio undecodable — not charged
Examples
// 401
{"error":{"message":"Missing or invalid API key. Pass it as `Authorization: Bearer <key>` or `X-API-Key: <key>`.","type":"authentication_error","param":null,"code":"invalid_api_key"}}
// 402
{"error":{"message":"Insufficient credits for this request. Top up your balance and retry.","type":"insufficient_quota","param":null,"code":"insufficient_credits"}}
// 429  (+ Retry-After: 1234)
{"error":{"message":"Rate limit exceeded for this API key.","type":"rate_limit_error","param":null,"code":"rate_limit_exceeded"}}
// 502
{"error":{"message":"The transcription backend failed to process this request. You were not charged.","type":"server_error","param":null,"code":"inference_failed"}}

Languages

25 languages with automatic detection. Pass language to hint, or omit to auto-detect.

Pricing & credits

Prepaid credits, billed per second of audio and rounded up per request. 1 credit = US$0.01; speech-to-text costs 4,200 micro-credits per second, i.e. US$0.1512 per hour of audio. New accounts get 100 credits free (US$1.00, about 6.6 hours). Packs: 1,000 credits = US$10, 5,000 = US$50, 25,000 = US$250. Each request reserves an estimate then settles the exact duration; failed requests are released and never charged. Buy credits and manage keys in the console.

Need something not covered here (batch pipelines, dedicated fleet, data residency, enterprise SSO)? Talk to us.