API Documentation
OpenAI-compatible API for distributed inference on Apple Silicon.
BASE URL
https://api.repogen.xyz/v1Quick Start
from openai import OpenAI
client = OpenAI(
base_url="https://api.repogen.xyz/v1",
api_key="rg_live_xxxxx"
)
response = client.chat.completions.create(
model="gpt-oss-20b",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)Authentication
Use Bearer token in the Authorization header.
Authorization: Bearer rg_live_xxxxxNever expose API keys in client-side code.
Chat Completions
POST
/v1/chat/completionsParameters
modelrequiredmessagesrequiredstreamoptionaltemperatureoptionalmax_tokensoptionalResponse
{
"id": "chatcmpl-abc123",
"model": "gpt-oss-20b",
"choices": [{
"message": {
"role": "assistant",
"content": "Hello!"
}
}],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 9
}
}Streaming
Set stream: true for SSE responses.
data: {"choices":[{"delta":{"content":"Hello"}}]}
data: {"choices":[{"delta":{"content":"!"}}]}
data: [DONE]Models
Prices per million tokens.
gpt-oss-20bGPT-OSS 20B · MoE
$0.02 in
$0.06 out
gemma-4-26bGemma 4 26B · MoE
$0.02 in
$0.06 out
Billing
- • Deposit USDC on Base
- • Pay per token consumed
- • 100% to providers during alpha
GET
/v1/balanceRate Limits
Free10 req/min
Paid100 req/min
Errors
400Bad Request401Unauthorized402Payment Required429Rate Limited500Internal Error503UnavailableFor Providers
Run inference on your Mac and earn USDC.
Terminal
# Download CLI
curl -L https://github.com/topguyaii/repogen-inference/releases/download/v0.1.0-alpha/repogen-macos-arm64.tar.gz | tar xz
sudo mv repogen /usr/local/bin/
# Verify & run
repogen doctor
repogen models download gpt-oss-20b
repogen start --foregroundRequirements
- • macOS 14.0+ (Sonoma)
- • Apple Silicon (M1/M2/M3/M4)
- • 8GB+ unified memory