Production posture
Built for stable production-scale text and multimodal traffic.
Complete docs organized around quick start, API reference, tutorials, and cookbook content.
Production posture
Built for stable production-scale text and multimodal traffic.
Capability mix
Text and multimodal traffic share one Model API contract.
Agent protocols
OpenAI-compatible access, MCP, llms.txt, and agents.md are exposed together.
Traffic policy
TTFT, backpressure, slow-consumer isolation, and regional rate limits are first-class.
OpenAPI
https://api.batchin.tech/openapi.json
API base
https://api.batchin.tech/v1
MCP
https://api.batchin.tech/v1/mcp
Public endpoints
/v1/chat/completions · /v1/responses · /v1/embeddings · /v1/images · /v1/audio/* · /v1/videos
Global Access, Unified Ingress
BatchIn coordinates API gateways, security controls, and compute availability to support localized delivery with unified engineering standards.
Open docsGlobal entry
Use this path for USD pricing, public MCP discovery, OpenAI-compatible access, and global-facing sales delivery.
Production posture
Built for stable production-scale traffic.
Traffic mix
Text plus vision, audio, image, and video workloads.
Streaming path
Regional ingress, stable streaming, and request continuity.
Control guardrails
Scoped limits, request isolation, and backpressure controls.
Public contract and readiness
Shared core
This is where public Model API, batch, usage, billing, and public MCP contract stay consistent.
Private lanes
Customer UI keeps one product truth while delivery, quota, and isolation can vary by contract.
Compute truth
Public pages show inventory and availability only from the verified compute registry.
Edge ingress
Latency work starts at the customer-facing edge before requests enter the primary execution path.
Streaming delivery
Connection reuse and consumer isolation are tuned to reduce jitter and long-tail failures.
Traffic policy
Customers see a simple API and clear limits while BatchIn handles traffic protection behind the scenes.
pip install openaifrom openai import OpenAI
client = OpenAI(
base_url="https://api.batchin.tech/v1",
api_key="YOUR_API_KEY"
)
resp = client.chat.completions.create(
model="qwen3-32b",
messages=[{"role": "user", "content": "Hello from BatchIn"}]
)
print(resp.choices[0].message.content)stream = client.chat.completions.create(
model="qwen3-32b",
messages=[{"role": "user", "content": "Write a haiku about latency"}],
stream=True
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="")See the self-serve path for dedicated endpoints, card-hour GPU usage, billing, and settlement.
OpenUnderstand dedicated endpoints, private deployment boundaries, key formats, and usage separation before you start a capacity rollout.
OpenReview how BatchIn positions route control, batch lanes, and fallback behavior before moving production traffic.
OpenOpen the public verification flow, inspect a signed evidence pack, and reproduce the trust check in the browser.
OpenReview the reserved OTLP ingest/export surface and the planned bridge from native traces into external observability tools.
Open/v1/users/meBearerGet current user profile for authenticated API key.
{}{
"id": "f6e2c67b-90cf-4f4e-b1e5-31d45f3b1b0a",
"email": "hello@luminapath.ai",
"name": "BatchIn Team",
"credit_balance_cents": 10000
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/users/me",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/keysBearerCreate a new API key with optional rate limit and monthly budget.
{
"name": "Production Key",
"rate_limit_rpm": 120,
"monthly_budget_cents": 500000
}{
"id": "f40cf8b0-c367-4764-92e3-cbd358fa3d76",
"key": "batchin_api_xxx",
"key_prefix": "batchin_api",
"name": "Production Key",
"rate_limit_rpm": 120,
"monthly_budget_cents": 500000,
"created_at": "2026-04-08T18:00:00Z"
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/keys",
headers=headers,
json={
"name": "Production Key",
"rate_limit_rpm": 120,
"monthly_budget_cents": 500000
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Key name |
| rate_limit_rpm | number | No | Requests per minute limit |
| monthly_budget_cents | number | No | Monthly budget in cents |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/keysBearerList all API keys for current user.
{}[
{
"id": "f40cf8b0-c367-4764-92e3-cbd358fa3d76",
"key_prefix": "batchin_api",
"name": "Production Key",
"rate_limit_rpm": 120,
"is_active": true,
"created_at": "2026-04-08T18:00:00Z"
}
]import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/keys",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/keys/{id}BearerDelete one API key by id.
{}204 No Contentimport os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"DELETE",
"https://api.batchin.tech/v1/keys/{id}",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| id | path:uuid | Yes | API key id |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| not_found | 404 | API key not found | Verify key id and retry. |
/v1/chat/completionsBearerText and multi-turn chat completion with SSE streaming support.
{
"model": "qwen3.5-27b",
"messages": [{"role":"user","content":"Explain attention in 3 bullets"}],
"temperature": 0.7,
"stream": false
}{
"id": "chatcmpl_xxx",
"object": "chat.completion",
"model": "qwen3.5-27b",
"choices": [{"index":0,"message":{"role":"assistant","content":"..."}}],
"usage": {"prompt_tokens": 22, "completion_tokens": 90, "total_tokens": 112}
}| Header | Description |
|---|---|
| traceparent | W3C trace context for linking the request into external tracing systems. |
| X-Request-Id | Request correlation id for support and audit troubleshooting. |
| X-BatchIn-Run-Id | BatchIn run id for this execution. |
| X-BatchIn-Prompt-Version | Prompt version bound to this run. |
| X-VaaS-Record-Id | Audit evidence record id. |
| X-VaaS-Signature | Audit evidence signature. |
| X-VaaS-PublicKey | Audit verification public key. |
import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/chat/completions",
headers=headers,
json={
"model": "qwen3.5-27b",
"messages": [{"role":"user","content":"Explain attention in 3 bullets"}],
"temperature": 0.7,
"stream": false
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID |
| messages | array | Yes | Chat message array |
| temperature | number | No | Sampling temperature |
| max_tokens | number | No | Max output tokens |
| stream | boolean | No | Enable streaming |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| payment_required | 402 | Insufficient balance or budget exceeded | Top up balance or increase monthly budget. |
/v1/responsesBearerResponses API compatibility layer with non-streaming response objects, SSE streaming events, and runtime receipt headers.
{
"model": "qwen3.5-27b",
"input": "Explain batch inference in 3 bullets",
"max_output_tokens": 256
}{
"id": "resp_chatcmpl_xxx",
"object": "response",
"model": "qwen3.5-27b",
"output": [
{
"type": "message",
"role": "assistant",
"content": [{"type":"output_text","text":"..."}]
}
],
"usage": {"input_tokens": 12, "output_tokens": 10, "total_tokens": 22}
}| Header | Description |
|---|---|
| traceparent | W3C trace context for linking the request into external tracing systems. |
| X-Request-Id | Request correlation id for support and audit troubleshooting. |
| X-BatchIn-Run-Id | BatchIn run id for this execution. |
| X-BatchIn-Prompt-Version | Prompt version bound to this run. |
| X-VaaS-Record-Id | Audit evidence record id. |
| X-VaaS-Signature | Audit evidence signature. |
| X-VaaS-PublicKey | Audit verification public key. |
import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/responses",
headers=headers,
json={
"model": "qwen3.5-27b",
"input": "Explain batch inference in 3 bullets",
"max_output_tokens": 256
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID |
| input | string|array | Yes | Input text or message array |
| max_output_tokens | number | No | Max output tokens |
| stream | boolean | No | Return Responses events as text/event-stream. |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| responses_streaming_disabled | 409 | Responses streaming is not enabled for this API key | Disable stream or contact support to enable streaming access. |
/v1/completionsBearerOpenAI-compatible text completions with prefix/suffix FIM-style passthrough.
{
"model": "qwen3.5-27b",
"prompt": "Complete this sentence: Batch processing helps",
"suffix": "for large workloads.",
"max_tokens": 128
}{
"id": "cmpl_xxx",
"object": "text_completion",
"choices": [{"index":0,"text":"reduce manual toil at scale.","finish_reason":"stop"}],
"usage": {"prompt_tokens": 24, "completion_tokens": 12, "total_tokens": 36}
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/completions",
headers=headers,
json={
"model": "qwen3.5-27b",
"prompt": "Complete this sentence: Batch processing helps",
"suffix": "for large workloads.",
"max_tokens": 128
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Completion model id |
| prompt | string|array | Yes | Prompt or prefix content |
| suffix | string | No | FIM suffix |
| max_tokens | number | No | Max completion tokens |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/embeddingsBearerConvert text into embeddings.
{
"model": "bge-m3",
"input": ["batch inference", "retrieval augmented generation"]
}{
"object": "list",
"data": [
{"index":0,"embedding":[0.012,-0.043,...]},
{"index":1,"embedding":[0.021,-0.011,...]}
]
}| Header | Description |
|---|---|
| traceparent | W3C trace context. |
| X-BatchIn-Run-Id | Run id for this embedding request. |
| X-BatchIn-Prompt-Version | Prompt version bound to this run. |
| X-VaaS-Record-Id | Audit evidence record id. |
import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/embeddings",
headers=headers,
json={
"model": "bge-m3",
"input": ["batch inference", "retrieval augmented generation"]
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Embedding model id |
| input | string|array | Yes | Text input to embed |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/audio/speechBearerConvert text into synthesized speech with CosyVoice / TTS-compatible models.
{
"model": "cosyvoice",
"input": "Welcome to BatchIn",
"voice": "alloy",
"response_format": "mp3"
}Binary audio payload (audio/mpeg)import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/audio/speech",
headers=headers,
json={
"model": "cosyvoice",
"input": "Welcome to BatchIn",
"voice": "alloy",
"response_format": "mp3"
}
)
print(response.content)| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Speech model id |
| input | string | Yes | Text to synthesize |
| voice | string | No | Voice preset |
| response_format | string | No | Audio response format |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/audio/transcriptionsBearerTranscribe speech or audio files into text, with compact or verbose segment-aware output.
multipart/form-data
file=@meeting.wav
model=whisper-large-v3-turbo
response_format=verbose_json
language=en{
"text": "BatchIn transcription output",
"language": "en",
"duration": 3.42,
"segments": [{"id":0,"start":0.0,"end":3.42,"text":"BatchIn transcription output"}]
}import os
import requests
with open("meeting.wav", "rb") as audio_file:
response = requests.request(
"POST",
"https://api.batchin.tech/v1/audio/transcriptions",
headers={"Authorization": f"Bearer {os.environ['BATCHIN_API_KEY']}"},
files={"file": audio_file},
data={
"model": "whisper-large-v3-turbo",
"response_format": "verbose_json",
"language": "en",
},
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| file | binary | Yes | Audio file upload |
| model | string | Yes | Transcription model id |
| language | string | No | Language code |
| prompt | string | No | Transcription prompt |
| response_format | string | No | Response format |
| temperature | number|string | No | Sampling temperature |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/videosBearerSubmit video generation jobs through the unified Model API video entry.
{
"model": "wan-2.2",
"prompt": "Create a product teaser for an AI cloud launch",
"duration_seconds": 6
}{
"id": "video_xxx",
"object": "video.generation",
"status": "queued",
"duration_seconds": 6,
"output_url": "https://api.batchin.tech/v1/files/file_video_xxx/content"
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/videos",
headers=headers,
json={
"model": "wan-2.2",
"prompt": "Create a product teaser for an AI cloud launch",
"duration_seconds": 6
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Video model id |
| prompt | string | Yes | Video prompt |
| duration_seconds | number | No | Video duration in seconds |
| aspect_ratio | string | No | Aspect ratio |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/imagesBearerGenerate images from text prompts through the unified Model API image entry.
{
"model": "flux-schnell",
"prompt": "A futuristic city at sunrise",
"size": "1024x1024"
}{
"created": 1775671200,
"data": [{"url":"https://batchin.tech/images/generated/abc.png"}]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/images",
headers=headers,
json={
"model": "flux-schnell",
"prompt": "A futuristic city at sunrise",
"size": "1024x1024"
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Image model id |
| prompt | string | Yes | Image prompt |
| size | string | No | Output size |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/modelsPublicReturns model status, pricing, context length, and license metadata.
{}{
"object": "list",
"data": [
{
"id":"qwen3.5-27b",
"status":"always_on",
"context_length":131072,
"pricing":{"std_input":0.02,"std_output":0.08}
}
]
}import os
import requests
headers = {}
response = requests.request(
"GET",
"https://api.batchin.tech/v1/models",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| service_unavailable | 503 | Model service unavailable | Check status page and retry later. |
/v1/batchesBearerSubmit batch jobs with mixed-model tasks and priorities.
{
"priority": "fill",
"webhook_url": "https://your-domain.com/webhooks/batchin",
"tasks": [
{"custom_id":"task-1","model":"qwen3.5-27b","request_body":{"messages":[{"role":"user","content":"translate this"}]}},
{"custom_id":"task-2","model":"glm-5.1","request_body":{"messages":[{"role":"user","content":"summarize this"}]}}
]
}{
"id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
"status":"pending",
"priority":"fill",
"total_tasks":2,
"completed_tasks":0,
"failed_tasks":0
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/batches",
headers=headers,
json={
"priority": "fill",
"webhook_url": "https://your-domain.com/webhooks/batchin",
"tasks": [
{"custom_id":"task-1","model":"qwen3.5-27b","request_body":{"messages":[{"role":"user","content":"translate this"}]}},
{"custom_id":"task-2","model":"glm-5.1","request_body":{"messages":[{"role":"user","content":"summarize this"}]}}
]
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| tasks | array | Yes | Task array (each task can set its own model) |
| priority | string(high|low|fill) | No | Scheduling priority |
| webhook_url | string(url) | No | Webhook callback URL |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| payload_too_large | 413 | Batch JSON payload exceeds 2MB | Split into smaller batches. |
/v1/batchesBearerList batch jobs for current user.
{}[
{
"id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
"status":"completed",
"priority":"fill",
"total_tasks":2,
"completed_tasks":2,
"failed_tasks":0
}
]import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/batches",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/batches/{id}BearerGet batch detail including task results.
{}{
"id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
"status":"completed",
"tasks":[{"custom_id":"task-1","status":"completed"}]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/batches/{id}",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| id | path:uuid | Yes | Batch id |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| not_found | 404 | Batch not found | Verify batch id. |
/v1/batches/{id}/cancelBearerCancel a pending or running batch job.
{}{
"id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
"status":"cancelled"
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/batches/{id}/cancel",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| id | path:uuid | Yes | Batch id |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/topup/alipay/checkoutBearerCreate an Alipay checkout session for Chinese-site credit top-up.
{
"amount_cents": 5000,
"currency": "cny",
"locale": "zh-CN"
}{
"object": "topup.alipay.checkout",
"session_id": "alipay_xxx",
"checkout_url": "https://openapi.alipay.com/gateway.do?..."
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/topup/alipay/checkout",
headers=headers,
json={
"amount_cents": 5000,
"currency": "cny",
"locale": "zh-CN"
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| amount_cents | number | Yes | Top-up amount in CNY cents |
| locale | string | No | Chinese locale, zh-CN or zh-HK |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/topup/stripe/checkoutBearerCreate Stripe checkout session for credit top-up.
{
"amount_cents": 5000
}{
"checkout_url":"https://buy.stripe.com/9B65kD4US2fLeEF4zweME00",
"session_id":"cs_test_xxx"
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/topup/stripe/checkout",
headers=headers,
json={
"amount_cents": 5000
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| amount_cents | number | Yes | Top-up amount in cents |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/topup/historyBearerGet top-up transaction history.
{}[
{
"id":"1544d6df-8fca-46f3-9091-95f81dc37efa",
"amount_cents":5000,
"source":"stripe",
"reference_id":"cs_test_xxx"
}
]import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/topup/history",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/topup/usdc/chainsBearerGet supported USDC chains and deposit addresses.
{}{
"chains":[
{"chain":"ethereum","deposit_address":"0x...","required_confirmations":12},
{"chain":"polygon","deposit_address":"0x...","required_confirmations":12}
]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/topup/usdc/chains",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/usage/logs?limit=50&offset=0BearerList request-level usage logs.
{}[
{
"id":"e73f9476-00ea-491f-ba6f-899602247a15",
"model":"qwen3.5-27b",
"input_tokens":120,
"output_tokens":88,
"cost_cents":2
}
]import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/usage/logs?limit=50&offset=0",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| limit | query:number | No | Page size (1-500) |
| offset | query:number | No | Offset |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/usage/summaryBearerGet total requests, tokens, and cost summary.
{}{
"total_requests": 1304,
"total_input_tokens": 2341122,
"total_output_tokens": 1111400,
"total_cost_cents": 18640
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/usage/summary",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| payment_required | 402 | API key monthly budget exceeded | Increase key budget or rotate key. |
/v1/usage/by-modelBearerAggregate usage by model dimension.
{}[
{
"model":"qwen3.5-27b",
"total_requests": 880,
"total_input_tokens": 1620012,
"total_output_tokens": 801202,
"total_cost_cents": 9900
}
]import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/usage/by-model",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/vaasBearerCreate verifiable audit record and signature.
{
"input_text": "What is a zero-knowledge proof?",
"output_text": "A cryptographic method...",
"model_id": "qwen3.5-27b",
"gpu_id": "execution-a19c-42ef"
}{
"audit_id":"ee3cc19e-710d-4a2d-bf01-0edca0c5fdf4",
"input_hash":"9a5f...",
"output_hash":"2f1b...",
"carbon_grams_co2e":0.0126,
"energy_wh":0.2107,
"energy_source":"Renewable grid mix",
"carbon_offset_vs_us_cloud":0.0717,
"signature":"bfc4..."
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/vaas",
headers=headers,
json={
"input_text": "What is a zero-knowledge proof?",
"output_text": "A cryptographic method...",
"model_id": "qwen3.5-27b",
"gpu_id": "execution-a19c-42ef"
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| input_text | string | Yes | Input text |
| output_text | string | Yes | Output text |
| model_id | string | Yes | Model id |
| gpu_id | string | No | Masked execution environment identifier |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/vaas/{id}PublicFetch audit details by audit_id.
{}{
"audit_id":"ee3cc19e-710d-4a2d-bf01-0edca0c5fdf4",
"input_hash":"9a5f...",
"output_hash":"2f1b...",
"carbon_grams_co2e":0.0126,
"energy_wh":0.2107,
"energy_source":"Renewable grid mix",
"carbon_offset_vs_us_cloud":0.0717,
"signature":"bfc4..."
}import os
import requests
headers = {}
response = requests.request(
"GET",
"https://api.batchin.tech/v1/vaas/{id}",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| id | path:uuid | Yes | Audit id |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| not_found | 404 | Audit record not found | Verify audit_id. |
/v1/vaas/{id}/verifyPublicVerify audit signature validity.
{}{
"audit_id":"ee3cc19e-710d-4a2d-bf01-0edca0c5fdf4",
"valid": true
}import os
import requests
headers = {}
response = requests.request(
"GET",
"https://api.batchin.tech/v1/vaas/{id}/verify",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| id | path:uuid | Yes | Audit id |
| Code | HTTP | Message | Resolution |
|---|
/v1/vaas/{id}/evidencePublicReturn the audit evidence pack used for browser verification and export workflows.
{}{
"record_id":"vaas_xxx",
"run_id":"run_xxx",
"customer_trace_id":"0123456789abcdef0123456789abcdef",
"public_route_label":"managed-text",
"environment":"development",
"prompt_version_id":"default",
"verification_method":"Ed25519Signature2020",
"public_key":"ed25519:pk_xxx",
"signature":"ed25519:xxx",
"payload": {"record_id":"vaas_xxx","input_hash":"sha256:...","output_hash":"sha256:..."}
}| Header | Description |
|---|---|
| Content-Type | JSON evidence pack that can be saved directly or passed into /verify. |
import os
import requests
headers = {}
response = requests.request(
"GET",
"https://api.batchin.tech/v1/vaas/{id}/evidence",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| id | path:uuid | Yes | Audit id |
| Code | HTTP | Message | Resolution |
|---|
/v1/vaas/pubkey/currentPublicGet public key used for browser-side signature verification.
{}{
"verify_key_hex":"1fbd9285..."
}import os
import requests
headers = {}
response = requests.request(
"GET",
"https://api.batchin.tech/v1/vaas/pubkey/current",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|
/v1/traces?limit=20BearerList native runtime traces with route, prompt-version, and audit linkage.
{}{
"items": [
{
"customer_trace_id":"0123456789abcdef0123456789abcdef",
"run_id":"run_xxx",
"record_id":"vaas_xxx",
"public_route_label":"managed-text",
"environment":"development",
"prompt_version_id":"default",
"model_id":"qwen3.5-27b"
}
]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/traces?limit=20",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| limit | query:number | No | Page size (1-100) |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/traces/{trace_id}BearerFetch one native runtime trace by trace_id.
{}{
"customer_trace_id":"0123456789abcdef0123456789abcdef",
"run_id":"run_xxx",
"record_id":"vaas_xxx",
"public_route_label":"managed-text",
"environment":"development",
"prompt_version_id":"default",
"model_id":"qwen3.5-27b"
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/traces/{trace_id}",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| trace_id | path:string | Yes | Trace ID |
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
| not_found | 404 | Trace not found | Verify the trace id and retry. |
/v1/promptsBearerReturn prompt registries with promoted versions, latest observed versions, and version details.
{}{
"status":"ready",
"docs":"/docs/prompts",
"items":[
{
"registry_id":"support",
"display_name":"support",
"source":"auto_backfill",
"latest_version_id":"support@v2",
"promoted_version_id":"support@v2",
"total_runs":4,
"versions":[
{
"version_id":"support@v1",
"status":"observed",
"total_runs":2
},
{
"version_id":"support@v2",
"status":"promoted",
"total_runs":2
}
]
}
]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/prompts",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/prompt-regressionsBearerReturn automatic sampled-replay regression runs with sample counts, similarity, and latency summaries.
{}{
"status":"ready",
"docs":"/docs/experiments",
"items":[
{
"regression_id":"preg_demo",
"registry_id":"support",
"baseline_prompt_version_id":"support@v1",
"candidate_prompt_version_id":"support@v2",
"status":"passed",
"judge":"deterministic_replay",
"sample_count":3,
"pass_count":3,
"fail_count":0,
"avg_similarity":1,
"baseline_avg_latency_ms":420,
"candidate_avg_latency_ms":390
}
]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/prompt-regressions",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/experimentsBearerReturn automatic experiments for candidate prompt versions, including replay state and auto-promotion results.
{}{
"status":"ready",
"docs":"/docs/experiments",
"items":[
{
"experiment_id":"pexp_demo",
"registry_id":"support",
"baseline_prompt_version_id":"support@v1",
"candidate_prompt_version_id":"support@v2",
"status":"passed",
"promotion_status":"promoted",
"sample_count":3,
"pass_rate":1
}
]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/experiments",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/otlp/tracesBearerAccept OTLP/HTTP JSON or protobuf traces and merge spans into the unified trace view.
{
"resourceSpans": []
}{}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://api.batchin.tech/v1/otlp/traces",
headers=headers,
json={
"resourceSpans": []
}
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/v1/otlp/exportBearerExport spans from the unified trace view as OTLP protobuf or JSON.
{}{
"resourceSpans":[]
}import os
import requests
headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
"GET",
"https://api.batchin.tech/v1/otlp/export",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|---|---|---|
| unauthorized | 401 | API key is invalid or missing | Verify Authorization: Bearer <API_KEY>. |
/healthPublicService health probe endpoint.
{}{
"status":"ok"
}import os
import requests
headers = {}
response = requests.request(
"GET",
"https://api.batchin.tech/health",
headers=headers,
)
print(response.json())| Name | Type | Required | Description |
|---|---|---|---|
| No parameters | |||
| Code | HTTP | Message | Resolution |
|---|
Split one million records into JSONL tasks, execute by priority tiers, and ingest callbacks automatically.
Combine embeddings, retrieval, reranking, and generation with observability and rollback controls.
Capture verifiable audit evidence at input, output, and human-review checkpoints with Ed25519 verification.
Release truth lives in the live model catalog, pricing surfaces, and verified route behavior. Use the public site and console evidence paths as the current changelog source of truth.