BatchIn

BatchIn Developer Documentation

Complete docs organized in an MDX-ready structure: quick start, API reference, tutorials, cookbook, and changelog.

Launch Readiness

Turn docs into running workloads

Follow signup → key creation → playground → batch and ship your first request in about 60 seconds.

Models Available: --

API Health: --

Last Checked: --

BatchIn vs SiliconFlow

A practical comparison for developers choosing between a more open operator model and a more compliance-constrained hosted platform.

FeatureBatchInSiliconFlow
VaaS audit trailBuilt-in Ed25519 audit records with browser verification.No equivalent verification layer.
Batch priorityHigh / Low / Fill tiers with visible operator tradeoffs.Standard batch only.
PaymentsStripe, USDC, and agent-payment roadmap.Regional payment rails only.
GPU controlGPU leasing with SSH root access and runtime control.Reserved GPU capacity without the same operator control model.

Quick Start (3 Languages)

1) Install

pip install openai

2) First Request

from openai import OpenAI

client = OpenAI(
  base_url="https://api.luminapath.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)

3) Streaming

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="")

Platform Playbooks

GPU Leasing Request Path

See the current GPU lineup, SSH access posture, and the commercial path for dedicated capacity requests.

Open

White-Label Deployment Path

Understand branded domains, key formats, and billing separation before you start a white-label rollout.

Open

API Reference

POST/v1/usersPublic

Create User

Create a user account (typically called by BFF).

Request Example

{
  "email": "dev@luminapath.tech",
  "name": "BatchIn Team",
  "password": "secure_password_123"
}

Response Example

{
  "id": "f6e2c67b-90cf-4f4e-b1e5-31d45f3b1b0a",
  "email": "dev@luminapath.tech",
  "name": "BatchIn Team",
  "credit_balance_cents": 0
}

Code Samples

import os
import requests

headers = {}
headers["Content-Type"] = "application/json"
response = requests.request(
    "POST",
    "https://api.luminapath.tech/v1/users",
    headers=headers,
    json={
  "email": "dev@luminapath.tech",
  "name": "BatchIn Team",
  "password": "secure_password_123"
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
emailstring(email)YesUser email
namestringYesDisplay name
passwordstringYesLogin password

Error Codes

CodeHTTPMessageResolution
conflict409Email already existsUse login flow or a different email.
Open Try it
POST/v1/users/loginPublic

User Login

Login with email and password.

Request Example

{
  "email": "dev@luminapath.tech",
  "password": "secure_password_123"
}

Response Example

{
  "id": "f6e2c67b-90cf-4f4e-b1e5-31d45f3b1b0a",
  "email": "dev@luminapath.tech",
  "name": "BatchIn Team",
  "credit_balance_cents": 10000
}

Code Samples

import os
import requests

headers = {}
headers["Content-Type"] = "application/json"
response = requests.request(
    "POST",
    "https://api.luminapath.tech/v1/users/login",
    headers=headers,
    json={
  "email": "dev@luminapath.tech",
  "password": "secure_password_123"
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
emailstring(email)YesLogin email
passwordstringYesLogin password

Error Codes

CodeHTTPMessageResolution
invalid_credentials401Invalid email or passwordVerify credentials and retry.
Open Try it
GET/v1/users/meBearer

Current User Profile

Get current user profile for authenticated API key.

Request Example

{}

Response Example

{
  "id": "f6e2c67b-90cf-4f4e-b1e5-31d45f3b1b0a",
  "email": "dev@luminapath.tech",
  "name": "BatchIn Team",
  "credit_balance_cents": 10000
}

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/users/me",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/users/by-email?email={email}Public

Get User by Email

Lookup user by email (pre-login check).

Request Example

{}

Response Example

{
  "id": "f6e2c67b-90cf-4f4e-b1e5-31d45f3b1b0a",
  "email": "dev@luminapath.tech",
  "name": "BatchIn Team",
  "credit_balance_cents": 10000
}

Code Samples

import os
import requests

headers = {}
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/users/by-email?email={email}",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
emailquery:string(email)YesTarget email

Error Codes

CodeHTTPMessageResolution
not_found404User not foundComplete signup first.
Open Try it
POST/v1/keysBearer

Create API Key

Create a new API key with optional rate limit and monthly budget.

Request Example

{
  "name": "Production Key",
  "rate_limit_rpm": 120,
  "monthly_budget_cents": 500000
}

Response Example

{
  "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"
}

Code Samples

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.luminapath.tech/v1/keys",
    headers=headers,
    json={
  "name": "Production Key",
  "rate_limit_rpm": 120,
  "monthly_budget_cents": 500000
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
namestringNoKey name
rate_limit_rpmnumberNoRequests per minute limit
monthly_budget_centsnumberNoMonthly budget in cents

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/keysBearer

List API Keys

List all API keys for current user.

Request Example

{}

Response Example

[
  {
    "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"
  }
]

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/keys",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
DELETE/v1/keys/{id}Bearer

Delete API Key

Delete one API key by id.

Request Example

{}

Response Example

204 No Content

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "DELETE",
    "https://api.luminapath.tech/v1/keys/{id}",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
idpath:uuidYesAPI key id

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
not_found404API key not foundVerify key id and retry.
Open Try it
POST/v1/chat/completionsBearer

Chat Completions

Text and multi-turn chat completion with SSE streaming support.

Request Example

{
  "model": "qwen3-32b",
  "messages": [{"role":"user","content":"Explain attention in 3 bullets"}],
  "temperature": 0.7,
  "stream": false
}

Response Example

{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "model": "qwen3-32b",
  "choices": [{"index":0,"message":{"role":"assistant","content":"..."}}],
  "usage": {"prompt_tokens": 22, "completion_tokens": 90, "total_tokens": 112}
}

Code Samples

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.luminapath.tech/v1/chat/completions",
    headers=headers,
    json={
  "model": "qwen3-32b",
  "messages": [{"role":"user","content":"Explain attention in 3 bullets"}],
  "temperature": 0.7,
  "stream": false
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
modelstringYesModel ID
messagesarrayYesChat message array
temperaturenumberNoSampling temperature
max_tokensnumberNoMax output tokens
streambooleanNoEnable streaming

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
payment_required402Insufficient balance or budget exceededTop up balance or increase monthly budget.
Open Try it
POST/v1/completionsBearer

Text Completions / FIM

OpenAI-compatible text completions with prefix/suffix FIM-style passthrough.

Request Example

{
  "model": "qwen3-32b",
  "prompt": "Complete this sentence: Batch processing helps",
  "suffix": "for large workloads.",
  "max_tokens": 128
}

Response Example

{
  "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}
}

Code Samples

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.luminapath.tech/v1/completions",
    headers=headers,
    json={
  "model": "qwen3-32b",
  "prompt": "Complete this sentence: Batch processing helps",
  "suffix": "for large workloads.",
  "max_tokens": 128
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
modelstringYesCompletion model id
promptstring|arrayYesPrompt or prefix content
suffixstringNoFIM suffix
max_tokensnumberNoMax completion tokens

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
POST/v1/embeddingsBearer

Embeddings

Convert text into embeddings.

Request Example

{
  "model": "bge-m3",
  "input": ["batch inference", "retrieval augmented generation"]
}

Response Example

{
  "object": "list",
  "data": [
    {"index":0,"embedding":[0.012,-0.043,...]},
    {"index":1,"embedding":[0.021,-0.011,...]}
  ]
}

Code Samples

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.luminapath.tech/v1/embeddings",
    headers=headers,
    json={
  "model": "bge-m3",
  "input": ["batch inference", "retrieval augmented generation"]
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
modelstringYesEmbedding model id
inputstring|arrayYesText input to embed

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
POST/v1/audio/speechBearer

Audio Speech

Convert text into synthesized speech with CosyVoice / TTS-compatible models.

Request Example

{
  "model": "cosyvoice",
  "input": "Welcome to BatchIn",
  "voice": "alloy",
  "response_format": "mp3"
}

Response Example

Binary audio payload (audio/mpeg)

Code Samples

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.luminapath.tech/v1/audio/speech",
    headers=headers,
    json={
  "model": "cosyvoice",
  "input": "Welcome to BatchIn",
  "voice": "alloy",
  "response_format": "mp3"
}
)

print(response.content)

Parameters

NameTypeRequiredDescription
modelstringYesSpeech model id
inputstringYesText to synthesize
voicestringNoVoice preset
response_formatstringNoAudio response format

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
POST/v1/video/generateBearer

Video Generate

Start video generation jobs with Wan 2.2-style models.

Request Example

{
  "model": "wan-2.2",
  "prompt": "Create a product teaser for an AI cloud launch",
  "duration_seconds": 6
}

Response Example

{
  "id": "video_xxx",
  "object": "video.generation",
  "status": "queued",
  "duration_seconds": 6,
  "output_url": "https://cdn.luminapath.tech/mock/video_xxx.mp4"
}

Code Samples

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.luminapath.tech/v1/video/generate",
    headers=headers,
    json={
  "model": "wan-2.2",
  "prompt": "Create a product teaser for an AI cloud launch",
  "duration_seconds": 6
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
modelstringYesVideo model id
promptstringYesVideo prompt
duration_secondsnumberNoVideo duration in seconds
aspect_ratiostringNoAspect ratio

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
POST/v1/images/generationsBearer

Image Generation

Generate images from text prompts.

Request Example

{
  "model": "flux-schnell",
  "prompt": "A futuristic city at sunrise",
  "size": "1024x1024"
}

Response Example

{
  "created": 1775671200,
  "data": [{"url":"https://luminapath.tech/images/generated/abc.png"}]
}

Code Samples

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.luminapath.tech/v1/images/generations",
    headers=headers,
    json={
  "model": "flux-schnell",
  "prompt": "A futuristic city at sunrise",
  "size": "1024x1024"
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
modelstringYesImage model id
promptstringYesImage prompt
sizestringNoOutput size

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/modelsPublic

List Models

Returns model status, pricing, context length, and license metadata.

Request Example

{}

Response Example

{
  "object": "list",
  "data": [
    {
      "id":"qwen3-32b",
      "status":"always_on",
      "context_length":131072,
      "pricing":{"std_input":0.02,"std_output":0.08}
    }
  ]
}

Code Samples

import os
import requests

headers = {}
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/models",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
service_unavailable503Model service unavailableCheck status page and retry later.
Open Try it
POST/v1/batchesBearer

Create Batch

Submit batch jobs with mixed-model tasks and priorities.

Request Example

{
  "priority": "fill",
  "webhook_url": "https://luminapath.tech/webhooks/batchin",
  "tasks": [
    {"custom_id":"task-1","model":"qwen3-32b","request_body":{"messages":[{"role":"user","content":"translate this"}]}},
    {"custom_id":"task-2","model":"deepseek-r1","request_body":{"messages":[{"role":"user","content":"summarize this"}]}}
  ]
}

Response Example

{
  "id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
  "status":"pending",
  "priority":"fill",
  "total_tasks":2,
  "completed_tasks":0,
  "failed_tasks":0
}

Code Samples

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.luminapath.tech/v1/batches",
    headers=headers,
    json={
  "priority": "fill",
  "webhook_url": "https://luminapath.tech/webhooks/batchin",
  "tasks": [
    {"custom_id":"task-1","model":"qwen3-32b","request_body":{"messages":[{"role":"user","content":"translate this"}]}},
    {"custom_id":"task-2","model":"deepseek-r1","request_body":{"messages":[{"role":"user","content":"summarize this"}]}}
  ]
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
tasksarrayYesTask array (each task can set its own model)
prioritystring(high|low|fill)NoScheduling priority
webhook_urlstring(url)NoWebhook callback URL

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
payload_too_large413Batch JSON payload exceeds 2MBSplit into smaller batches.
Open Try it
GET/v1/batchesBearer

List Batches

List batch jobs for current user.

Request Example

{}

Response Example

[
  {
    "id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
    "status":"completed",
    "priority":"fill",
    "total_tasks":2,
    "completed_tasks":2,
    "failed_tasks":0
  }
]

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/batches",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/batches/{id}Bearer

Get Batch Detail

Get batch detail including task results.

Request Example

{}

Response Example

{
  "id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
  "status":"completed",
  "tasks":[{"custom_id":"task-1","status":"completed"}]
}

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/batches/{id}",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
idpath:uuidYesBatch id

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
not_found404Batch not foundVerify batch id.
Open Try it
POST/v1/batches/{id}/cancelBearer

Cancel Batch

Cancel a pending or running batch job.

Request Example

{}

Response Example

{
  "id":"0b0db2a6-0baf-4ec4-a5e7-bce60da57db6",
  "status":"cancelled"
}

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "POST",
    "https://api.luminapath.tech/v1/batches/{id}/cancel",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
idpath:uuidYesBatch id

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
POST/v1/topup/stripe/checkoutBearer

Create Stripe Checkout

Create Stripe checkout session for credit top-up.

Request Example

{
  "amount_cents": 5000
}

Response Example

{
  "checkout_url":"https://buy.stripe.com/9B65kD4US2fLeEF4zweME00",
  "session_id":"cs_test_xxx"
}

Code Samples

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.luminapath.tech/v1/topup/stripe/checkout",
    headers=headers,
    json={
  "amount_cents": 5000
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
amount_centsnumberYesTop-up amount in cents

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/topup/historyBearer

Top-up History

Get top-up transaction history.

Request Example

{}

Response Example

[
  {
    "id":"1544d6df-8fca-46f3-9091-95f81dc37efa",
    "amount_cents":5000,
    "source":"stripe",
    "reference_id":"cs_test_xxx"
  }
]

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/topup/history",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/topup/usdc/chainsBearer

USDC Chain Info

Get supported USDC chains and deposit addresses.

Request Example

{}

Response Example

{
  "chains":[
    {"chain":"ethereum","deposit_address":"0x...","required_confirmations":12},
    {"chain":"polygon","deposit_address":"0x...","required_confirmations":12}
  ]
}

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/topup/usdc/chains",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/usage/logs?limit=50&offset=0Bearer

Usage Logs

List request-level usage logs.

Request Example

{}

Response Example

[
  {
    "id":"e73f9476-00ea-491f-ba6f-899602247a15",
    "model":"qwen3-32b",
    "input_tokens":120,
    "output_tokens":88,
    "cost_cents":2
  }
]

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/usage/logs?limit=50&offset=0",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
limitquery:numberNoPage size (1-500)
offsetquery:numberNoOffset

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/usage/summaryBearer

Usage Summary

Get total requests, tokens, and cost summary.

Request Example

{}

Response Example

{
  "total_requests": 1304,
  "total_input_tokens": 2341122,
  "total_output_tokens": 1111400,
  "total_cost_cents": 18640
}

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/usage/summary",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
payment_required402API key monthly budget exceededIncrease key budget or rotate key.
Open Try it
GET/v1/usage/by-modelBearer

Usage by Model

Aggregate usage by model dimension.

Request Example

{}

Response Example

[
  {
    "model":"qwen3-32b",
    "total_requests": 880,
    "total_input_tokens": 1620012,
    "total_output_tokens": 801202,
    "total_cost_cents": 9900
  }
]

Code Samples

import os
import requests

headers = {}
headers["Authorization"] = f"Bearer {os.environ['BATCHIN_API_KEY']}"
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/usage/by-model",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
POST/v1/auditBearer

Create Audit Record

Create verifiable audit record and signature.

Request Example

{
  "input_text": "What is a zero-knowledge proof?",
  "output_text": "A cryptographic method...",
  "model_id": "qwen3-32b",
  "gpu_id": "gpu-42"
}

Response Example

{
  "audit_id":"ee3cc19e-710d-4a2d-bf01-0edca0c5fdf4",
  "input_hash":"9a5f...",
  "output_hash":"2f1b...",
  "signature":"bfc4..."
}

Code Samples

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.luminapath.tech/v1/audit",
    headers=headers,
    json={
  "input_text": "What is a zero-knowledge proof?",
  "output_text": "A cryptographic method...",
  "model_id": "qwen3-32b",
  "gpu_id": "gpu-42"
}
)

print(response.json())

Parameters

NameTypeRequiredDescription
input_textstringYesInput text
output_textstringYesOutput text
model_idstringYesModel id
gpu_idstringNoGPU identifier

Error Codes

CodeHTTPMessageResolution
unauthorized401API key is invalid or missingVerify Authorization: Bearer <API_KEY>.
Open Try it
GET/v1/audit/{id}Public

Get Audit Record

Fetch audit details by audit_id.

Request Example

{}

Response Example

{
  "audit_id":"ee3cc19e-710d-4a2d-bf01-0edca0c5fdf4",
  "input_hash":"9a5f...",
  "output_hash":"2f1b...",
  "signature":"bfc4..."
}

Code Samples

import os
import requests

headers = {}
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/audit/{id}",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
idpath:uuidYesAudit id

Error Codes

CodeHTTPMessageResolution
not_found404Audit record not foundVerify audit_id.
Open Try it
GET/v1/audit/{id}/verifyPublic

Verify Audit Signature

Verify audit signature validity.

Request Example

{}

Response Example

{
  "audit_id":"ee3cc19e-710d-4a2d-bf01-0edca0c5fdf4",
  "valid": true
}

Code Samples

import os
import requests

headers = {}
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/audit/{id}/verify",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
idpath:uuidYesAudit id

Error Codes

CodeHTTPMessageResolution
Open Try it
GET/v1/audit/pubkey/currentPublic

Get Current Verify Public Key

Get public key used for browser-side signature verification.

Request Example

{}

Response Example

{
  "verify_key_hex":"1fbd9285..."
}

Code Samples

import os
import requests

headers = {}
response = requests.request(
    "GET",
    "https://api.luminapath.tech/v1/audit/pubkey/current",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
Open Try it
GET/healthPublic

Health Check

Service health probe endpoint.

Request Example

{}

Response Example

{
  "status":"ok"
}

Code Samples

import os
import requests

headers = {}
response = requests.request(
    "GET",
    "https://api.luminapath.tech/health",
    headers=headers,
    
)

print(response.json())

Parameters

NameTypeRequiredDescription
No parameters

Error Codes

CodeHTTPMessageResolution
Open Try it

Tutorials

Batch Tutorial

  1. Upload a JSONL input file (one task per line).
  2. Create a batch job and store batch_id.
  3. Poll status, then download output file.

VaaS Tutorial

  1. Send text to /v1/audit.
  2. Define policy thresholds using risk_score.
  3. Connect final decisions to audit logs.

Cookbook

Batch Pipeline for 1M Documents

Split one million records into JSONL tasks, execute by priority tiers, and ingest callbacks automatically.

Production RAG Pipeline

Combine embeddings, retrieval, reranking, and generation with observability and rollback controls.

VaaS Audit Integration

Capture verifiable audit evidence at input, output, and human-review checkpoints with Ed25519 verification.

Changelog

  • 2026-04-08Console UX Upgrade

    Playground now supports Python ZIP export and read-only share links; notification center uses real API aggregation.

  • 2026-04-07Documentation Expansion

    Added complete endpoint parameter/error tables, Batch and VaaS tutorials, and Try-it deep links to console.

  • 2026-04-06Security Hardening

    Shipped signed sessions, dual-layer auth, production CORS restrictions, and unknown-model billing rejection.