Guts AI is a unified model gateway. Reach frontier models from every major provider through OpenAI- and Anthropic-compatible endpoints, priced per 1M tokens and shown in USD or rupiah.
Models list input, output and cache-read prices per 1M tokens, in USD or rupiah. Top up in rupiah with QRIS, a bank virtual account or an e-wallet, or in USDT. No subscriptions.
Top up in rupiah or USDT
QRIS, virtual account and e-wallet payments are credited once confirmed. For Binance Pay or USDT on BEP20, you submit the order ID or transaction hash and it is verified before crediting.
Reserved before it runs
Each request reserves part of your balance when it opens and settles to its actual usage when it ends. Your balance does not drop below zero.
Automatic provider fallback
Every model id is backed by a chain of one or more providers and keys. A rate limit or provider error fails over to the next one automatically.
Send your first request
Point any OpenAI client at the Guts AI base URL and authenticate with your key as a Bearer token.
1curl -X POST "https://api.gutsai.id/v1/chat/completions" \
2 -H "Authorization: Bearer $GUTS_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5"model": "claude-sonnet-5.5",
6"messages": [
7 {"role": "system", "content": "You are an expert AI assistant."},
8 {"role": "user", "content": "Explain quantum computing in one sentence."}
9 ],
10"temperature": 0.7,
11"max_tokens": 150
12 }'
1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.gutsai.id/v1",
6 api_key=os.environ.get("GUTS_API_KEY")
7)
8
9response = client.chat.completions.create(
10 model="claude-sonnet-5.5",
11 messages=[
12 {"role": "system", "content": "You are an expert AI assistant."},
13 {"role": "user", "content": "Explain quantum computing in one sentence."}
Automatic failover If a provider fails before it starts answering, Guts AI tries the next one in the model's chain, and that failed attempt is not billed.
Gateway latency
Requests reach the provider with about 11.4 ms of gateway overhead, and streamed tokens are relayed to you as they arrive, so a response starts as fast as the upstream model allows.
11"content": "Quantum computing harnesses the principles of superposition and entanglement to perform complex calculations exponentially faster than classical computers."
All API requests to Guts AI must be authenticated using standard HTTP Bearer token authentication in the request header (or x-api-key for Anthropic native SDK clients).
Standard Bearer token format: Bearer sk-guts-... (OpenAI Spec).
x-api-key
string
Supported for Anthropic native SDKs and Claude Code CLI.
anthropic-version
string
Optional version header for Anthropic clients (default: 2023-06-01).
App attribution
Your request logs show the app that sent each request, and apps appear on the public Apps ranking. Coding agents and chat apps are recognised automatically from the headers they already send, so there is nothing to set up. To name your own app, send these headers:
Header
Description
HTTP-Referer
Your app's site, for example https://your-app.example. It identifies the app: only the scheme and host are kept, plus the owner and repository for a GitHub or GitLab URL (https://github.com/owner/repo). Local and private sites, and any address written as a site, are ignored.
X-Guts-Title
The name shown for your app, for example Your App. X-Title works too, so an app that already sends it needs no change. Names that hold an address, a URL, an email or a key are ignored.
X-Guts-Categories
Up to five categories, comma-separated, for example cli-agent,programming-app. The categories are cli-agent, ide-extension, cloud-agent, programming-app, native-app-builder, creative-writing, video-gen, image-gen, audio-gen, writing-assistant, general-chat, personal-agent, legal, roleplay, game.
X-Guts-App-Visibility
Set to hidden to unlist a self-identified app you own from the public Apps ranking. For a well-known app, it only leaves your own requests out of that app's totals. Your own request logs still show them.
Replace the example site and name with your own: .example sites are ignored. What is recorded per request is the app's name, site and categories and your client's User-Agent. No IP address is ever recorded or shown: addresses in a User-Agent are replaced with [ip]. An app that names itself is public by default: it is listed once it has used 1M tokens in the period shown and was first seen a day ago, and the account that first used that site or title sets its name, site, categories and visibility. To stay unlisted, send X-Guts-App-Visibility: hidden. Libraries and SDKs on their own (curl, the OpenAI SDK) are shown in your logs but not ranked.
Rotating your API key
If you suspect your API key has been exposed or compromised, you can rotate it in the Developer Console. The old key stops working as soon as the rotation is saved, and your remaining balance will remain safely intact in your account.
Guts AI exposes an OpenAI-style discovery endpoint. It lists the catalog models, each with a status (inactive models are marked offline), its input_modalities and price_per_1m, which is in rupiah per 1M tokens (null when the model has no price set; the input price when the model lists separate prices). pricing_rp gives the input, output and cache_read prices per 1M tokens in rupiah. The Models page shows the same prices in USD or rupiah.
https://api.gutsai.id/v1/models
Fetch active models
1curl "https://api.gutsai.id/v1/models" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.gutsai.id/v1",
6 api_key=os.environ.get("GUTS_API_KEY")
7)
8
9models = client.models.list()
10for m in models.data:
11 print(f"- {m.id}")
1import OpenAI from "openai";
2
3const openai = new OpenAI({
4 baseURL: "https://api.gutsai.id/v1",
5 apiKey: process.env.GUTS_API_KEY,
6});
7
8async function listModels() {
9 const response = await openai.models.list();
10 console.log(response.data.map(m => m.id));
11}
12
13listModels();
Popular production model IDs
Here are some model IDs available on Guts AI. Current prices, in USD or rupiah, are on the Models page.
GET /v1/key · /v1/credits · /v1/generations · /v1/activity
Usage & account API
These endpoints let your code read a key's limits, your balance and the history of your requests: their tokens, cost and timings. Authenticate with a standard API key (sk-guts-…) in the Authorization: Bearer header. A standard key reads its own requests only. A management key (sk-guts-mgmt-…) reads the same endpoints for the whole account.
Rate limits
Each account has one budget per endpoint, counted per minute and shared by all its standard keys, so more keys do not buy more requests. Each management key has a budget of its own. Over it, the answer is 429 rate_limit_exceeded with a Retry-After header. When the service is busy, these endpoints may answer 503 service_unavailable with Retry-After: 1: wait that many seconds and retry. An account can have at most 4 of these requests running at once; more answer 429 rate_limit_exceeded with Retry-After: 1.
Endpoint
Requests per minute
GET /v1/key, GET /v1/credits
60
GET /v1/generation, GET /v1/generations
120
GET /v1/activity
30
Inspect the current key
GET https://api.gutsai.id/v1/key
Returns the key's label, spend limit and what remains of it, its usage today, this week, this month and in total (USD and rupiah), its rate limit and the account balance. is_management_key tells a standard key (false) from a management key.
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
1{
2"data": {
3"total_credits": 50.0,
4"total_credits_rp": 800000,
5"total_usage": 37.6,
6"total_usage_rp": 601600,
7"balance": 12.4,
8"balance_rp": 198400
9 }
10}
Look up one request
GET https://api.gutsai.id/v1/generation?id=…
id takes the id of the answer you received (chatcmpl-… or msg_…) or its request id (req_…, from the X-Request-Id or X-Generation-Id header). An id that is not one of your requests is 404 not_found. A lookup that takes too long answers 503 service_unavailable with Retry-After: 2: retry it.
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
1{
2"data": {
3"id": "chatcmpl-5f1c0e9b2a7d4c3e8f901a2b",
4"request_id": "req_5f1c0e9b2a7d4c3e8f901a2b",
5"model": "gpt-5.5",
6"created_at": "2026-12-03T10:12:44Z",
7"provider_name": "OpenAI",
8"endpoint": "/v1/chat/completions",
9"streamed": true,
10"status": "ok",
11"finish_reason": "stop",
12"native_finish_reason": "stop",
13"cancelled": false,
14"tokens_prompt": 1200,
15"tokens_completion": 300,
16"native_tokens_prompt": 1200,
17"native_tokens_completion": 300,
18"native_tokens_reasoning": null,
19"native_tokens_cached": 800,
20"native_tokens_cache_write": 0,
21"n_images": 0,
22"num_media_completion": 0,
23"latency": 2310,
24"generation_time": 1900,
25"ttft": 410,
26"moderation_latency": null,
27"total_cost": 0.00042,
28"usage": 0.00042,
29"cost_rp": 7,
30"reasoning_effort": "medium",
31"response_cache_hit": false,
32"app": "Cline",
33"error": null
34 }
35}
Field
Meaning
status
ok, error or aborted (the client closed the connection; cancelled is then true)
tokens_prompt, tokens_completion
Billed input and output tokens; the native_ fields repeat them, plus cached and cache-write input tokens
latency
Whole request, in milliseconds
generation_time, ttft
Time spent generating, and time to the first token of a streamed answer, in milliseconds (null when not measured)
total_cost, usage
The charge in USD (null without an exchange rate)
cost_rp
The charge in rupiah
finish_reason
Why the answer ended; native_finish_reason carries the same value
error
What went wrong, for a request that did not succeed; null otherwise
app
The client application that sent the request, when Guts AI recognised it
List requests
GET https://api.gutsai.id/v1/generations
Lists requests newest first, each as the object above. Page with next_cursor while has_more is true.
Parameter
Description
limit
1 to 100 items per page (default 20)
cursor
The next_cursor of the previous page
from, to
An RFC 3339 time or a date (YYYY-MM-DD, UTC). to is exclusive; a date includes that whole day. Default: the last 30 days. At most 90 days apart, or 7 days when model or status is set (then also the default)
model
Only this model id
status
success, error or cancelled
id
Only the request with this id (as for /v1/generation)
api_key_id, api_key_hash
Management keys only: one key of the account, by id or by its SHA-256 hash
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
Requests that Guts AI refused before they reached a model are listed with statuserror and cost_rp0. If a query covers too much history to answer in time, the answer is 400 query_too_broad (param from): narrow from/to, add an id or remove filters rather than retrying. With a management key every item also carries api_key_id. Requests made with a key that was later deleted stay in your history here, in /v1/activity and in the totals; only the key lists leave deleted keys out.
Daily activity
GET https://api.gutsai.id/v1/activity
Usage per day and model over the last 30 completed UTC days: requests, tokens and cost. Requests refused by Guts AI before they reached a model are not counted. Answers are cached for up to one minute.
Parameter
Description
date
One day inside the window (YYYY-MM-DD, UTC)
model
Only this model id
scope
Management keys: account (default) or key
group_by
Management keys: model (default) or key, which adds api_key_id and api_key_name
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
1{
2"object": "list",
3"data": [
4 {
5"date": "2026-12-03",
6"model": "gpt-5.5",
7"provider_name": "OpenAI",
8"requests": 412,
9"prompt_tokens": 1830211,
10"completion_tokens": 220114,
11"reasoning_tokens": null,
12"cached_tokens": 1210000,
13"cache_write_tokens": 0,
14"usage": 3.41,
15"usage_rp": 54560
16 }
17 ],
18"has_more": false,
19"next_cursor": null
20}
If the activity cannot be read in time, the answer is 503 service_unavailable with Retry-After: 2: retry it.
GET /v1/models · /v1/models/count · /v1/models/{id}/endpoints
Models API
Discover the catalog from code: the models, how many there are, and how each one is performing right now. Prices and the fields of the list are described in Model catalog & pricing.
List models
GET https://api.gutsai.id/v1/models
Each item carries a description when one is known and created, the model's release date as a Unix time.
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
1{ "data": { "count": 57 } }
Model performance
GET https://api.gutsai.id/v1/models/{id}/endpoints
Returns the model with one endpoint: Guts AI's, with its context length, prices, supported parameters, status, uptime and the latency, time to first token and throughput of the last 30 minutes. No key is needed; each IP address may call it 30 times a minute. The figures are refreshed about once a minute; stats_updated_at says when.
0 operational, -1 degraded (uptime over the last 30 minutes under 95 %), -2 down (under 50 %, or the model is inactive)
uptime_last_5m, uptime_last_30m
Share of successful requests, in percent; null with fewer than 3 requests
uptime_last_1d
The same over the last 24 hourly buckets (the current hour included); null for an inactive model
latency_last_30m
Whole-request time in milliseconds. pN is the time N % of requests finish at or under, so the values grow from p50 to p99
ttft_last_30m
Time to the first token of streamed requests, in milliseconds, read the same way
throughput_last_30m
Output tokens per second. This is a slow tail: pN is the speed N % of requests reach or beat, so the values fall from p50 to p99
throughput_basis
generation: tokens per second of generation time. request: tokens per second of the whole request, used when too few requests measured their generation time (mostly non-streamed traffic). The request rate includes the wait for the first token, so it reads lower
Percentiles are null with fewer than 20 measured requests.
Compare like with like. Near the 20-request floor, throughput_basis can switch between generation and request from one refresh to the next, and the throughput figures jump with it. Read throughput_basis before you compare values across refreshes, and compare only values with the same basis.
sk-guts-mgmt-… · /v1/keys · /v1/transactions
Management keys
A management key (sk-guts-mgmt-…) works on your account rather than on one key: it lists, creates, changes and deletes your API keys, and reads the whole account's usage, requests, credits and transactions. It cannot call models: model endpoints answer 403 management_key_not_allowed. Use a standard API key (sk-guts-…) for model requests.
Guts AI can temporarily disable management keys for everyone (for example during an incident). While disabled, every management key gets 401 invalid_api_key; your standard keys keep working. Keys come back unchanged when re-enabled.
Create a management key
Create management keys in the Console under Settings → Management keys: give the key a name, choose its access and, if you like, an expiry date. The key is shown once; store it as a secret. Revoking a key in the Console is immediate and cannot be undone.
Recent sign-in required. A full key needs a sign-in within the last 10 minutes, a read key one within the last 24 hours. Otherwise the Console asks you to sign in again (403 reauth_required).
An account can hold 5 active management keys, and create at most 5 in an hour.
Every management key created or revoked, and every API key change made with a management key, is sent to you by email and Telegram and listed under Activity in Settings → Management keys.
Access
Can do
read
GET on every endpoint below
full
Everything read can, plus POST, PATCH and DELETE on /v1/keys. A read key that tries is answered 403 management_key_read_only
Account-wide reads
With a management key the usage endpoints cover every key of the account: /v1/credits returns the account's credits; /v1/activity takes scope, group_by=key and api_key_id; /v1/generations and /v1/generation include every key's requests, each with its api_key_id. /v1/key describes the management key itself. A key id that is not one of the account's is 404 key_not_found.
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
Manage API keys
GET https://api.gutsai.id/v1/keys
GET /v1/keys lists the account's standard keys (add include_disabled=true to include disabled ones); deleted keys are never listed. GET, PATCH and DELETE /v1/keys/{id} act on one key, by its id or its hash. A key's secret is shown only once, when the key is created (here or in the Console) or rotated in the Console; it is never returned again. Each management key may read 60 times and write 10 times a minute.
6if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
7const { data } = await res.json();
8console.log(data);
The answer is 201 with the key under data and its secret under key, shown this once.
Field
Description
name
Required, 1 to 64 characters
limit or limit_rp
A spend limit in USD (converted to rupiah at the current rate, rounded down) or in rupiah; send one of them, not both. null: no spend limit
limit_reset
daily, monthly or null. null makes the limit a lifetime limit. This differs from the Console, where an empty period means monthly. Daily and monthly windows follow Western Indonesia Time (WIB, UTC+7): they start again at 17:00 UTC
rpm_limit
A cap on the key's requests per minute, or null
expires_at
A date (YYYY-MM-DD): the key stops at the end of that day, WIB. null: no expiry
Keys created by a management key always carry a spend limit or an rpm_limit. If you send neither, rpm_limit is set to the key's own rate limit (60 requests per minute today). Such a key calls models as usual, but it can never act for your account: it cannot sign in to the Console, read the account's transactions or manage keys.
The rpm_limit is stored as a number when the key is created. If the key's rate limit is raised later, the rpm_limit still applies until you raise it in the Console or with PATCH /v1/keys/{id}.
An account holds up to 20 keys (409 key_limit_reached). Retrying a POST that timed out may create a second key; list the keys before you retry.
6if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
7const { data } = await res.json();
8console.log(data);
Send any of name, disabled, limit/limit_rp, limit_reset, rpm_limit and expires_at. After the change the key must still have a spend limit or an rpm_limit (otherwise 400 invalid_request, param rpm_limit). A key without either, created in the Console, may still be renamed or disabled; to enable it again, use the Console or give it a limit (403 session_required). The key the Telegram store uses can only be renamed, disabled or enabled (409 key_protected). A key whose expiry has passed is still listed but can no longer be changed (409 key_expired).
A full management key can disable any standard key of the account, the Telegram store's key and keys without limits included. Enabling a key that has no spend limit and no rpm_limit again needs the Console (403 session_required), and the Telegram store's key cannot be given a limit here, so disable such a key through the API only if you can sign in to the Console.
Deleting a key is permanent: it stops working immediately and the deletion cannot be undone. Deleting follows the Console's rules: the Telegram store's key, the last key holding balance and the last key without an expiry date cannot be deleted (409). A key with a request in progress answers 409 key_busy; retry shortly.
Transactions
GET https://api.gutsai.id/v1/transactions
Top-ups and Telegram balance conversions of the account, newest first, paged like /v1/generations.
Parameter
Description
limit, cursor
1 to 100 per page (default 20); the previous page's next_cursor
status
all (default), pending, paid or cancelled
method
A payment method, for example qris
from, to
An RFC 3339 time or a date; to is exclusive, a date includes that day
Guts AI accepts the standard OpenAI function-calling fields (tools, tool_choice) and passes them to the model. Models that support tool use answer with tool_calls; whether a model uses tools depends on the model and its provider.
Defining tools schema
1from openai import OpenAI
2import os
3import json
4
5client = OpenAI(
6 base_url="https://api.gutsai.id/v1",
7 api_key=os.environ.get("GUTS_API_KEY")
8)
9
10tools = [
11 {
12"type": "function",
13"function": {
14"name": "get_stock_quote",
15"description": "Get the latest stock and foreign exchange prices",
16"parameters": {
17"type": "object",
18"properties": {
19"symbol": {
20"type": "string",
21"description": "Stock ticker symbol (e.g. AAPL, BBCA.JK)"
22 }
23 },
24"required": ["symbol"]
25 }
26 }
27 }
28]
29
30response = client.chat.completions.create(
31 model="claude-sonnet-5.5",
32 messages=[{"role": "user", "content": "What is the price of BBCA.JK?"}],
33 tools=tools,
34 tool_choice="auto"
35)
36
37message = response.choices[0].message
38if message.tool_calls:
39 for tool_call in message.tool_calls:
40 print(f"Tool to invoke: {tool_call.function.name}")
1curl -X POST "https://api.gutsai.id/v1/chat/completions" \
2 -H "Authorization: Bearer $GUTS_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5"model": "claude-sonnet-5.5",
6"messages": [
7 {"role": "user", "content": "What is the price of BBCA.JK?"}
8 ],
9"tools": [
10 {
11"type": "function",
12"function": {
13"name": "get_stock_quote",
14"description": "Get the latest stock prices",
15"parameters": {
16"type": "object",
17"properties": {
18"symbol": {"type": "string"}
19 },
20"required": ["symbol"]
21 }
22 }
23 }
24 ]
25 }'
Parallel tool calling
Models can generate multiple tool calls simultaneously in a single turn. Your application can execute all tool calls in parallel and pass back the tool responses in the subsequent message array.
Request JSON output with the standard response_format parameter, either {"type": "json_object"} or a strict JSON Schema. Guts AI passes it to the provider; how closely the output follows it depends on the model, so validate the JSON you receive.
Strict JSON schema output
1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.gutsai.id/v1",
6 api_key=os.environ.get("GUTS_API_KEY")
7)
8
9response = client.chat.completions.create(
10 model="claude-sonnet-5.5",
11 messages=[
12 {"role": "system", "content": "Extract customer information accurately."},
13 {"role": "user", "content": "My name is John Doe, email john@example.com, age 32."}
Guts AI natively preserves and streams chain-of-thought thinking tokens from frontier reasoning models (such as DeepSeek-V4 Pro, Claude Sonnet 5.5, and Kimi k3).
Streaming thinking deltas
In OpenAI chat completions format, reasoning tokens are returned in the delta under reasoning_content, followed by the final answer in content.
1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.gutsai.id/v1",
6 api_key=os.environ.get("GUTS_API_KEY")
7)
8
9stream = client.chat.completions.create(
10 model="deepseek-v4-pro",
11 messages=[{"role": "user", "content": "How many r are in the word strawberry?"}],
12 stream=True
13)
14
15for chunk in stream:
16 delta = chunk.choices[0].delta
17 # Check for thinking/reasoning token
18 if hasattr(delta, "reasoning_content") and delta.reasoning_content:
When calling Anthropic endpoints directly (via /v1/messages), you can specify explicit reasoning budgets with thinking: {"type": "enabled", "budget_tokens": 4096}.
Guts AI relays each streamed chunk to you as soon as the provider sends it. Tokens stream continuously via Server-Sent Events (SSE) until the [DONE] marker is emitted.
SSE protocol specification
When "stream": true is included in your request, the server responds with Content-Type: text/event-stream. Each chunk contains a JSON payload prefixed by data: .
1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.gutsai.id/v1",
6 api_key=os.environ.get("GUTS_API_KEY")
7)
8
9stream = client.chat.completions.create(
10 model="claude-sonnet-5.5",
11 messages=[{"role": "user", "content": "Write a haiku about high-speed AI gateways."}],
12 stream=True
13)
14
15for chunk in stream:
16 content = chunk.choices[0].delta.content
17 if content:
18 print(content, end="", flush=True)
19print()
1curl -N -X POST "https://api.gutsai.id/v1/chat/completions" \
2 -H "Authorization: Bearer $GUTS_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5"model": "claude-sonnet-5.5",
6"messages": [
7 {"role": "user", "content": "Write a haiku about high-speed AI gateways."}
Guts AI natively implements Anthropic's official /v1/messages protocol, allowing you to use official Anthropic SDKs (Python and TypeScript), Claude Code CLI, and reasoning parameters (such as Thinking Budgets) seamlessly.
https://api.gutsai.id/v1/messages
Request parameters
Parameter
Type
Description
modelrequired
string
Model ID (e.g. claude-sonnet-5.5, claude-sonnet-5, claude-opus-5).
messagesrequired
array
Array of input messages (roles: user, assistant).
max_tokensrequired
integer
The maximum number of tokens to generate before stopping.
system
string | array
Top-level system prompt or structured content blocks.
thinking
object
Configuration for extended thinking (e.g. {"type": "enabled", "budget_tokens": 2048}).
stream
boolean
Whether to incrementally stream the response using SSE.
Anthropic SDK example
1import anthropic
2import os
3
4client = anthropic.Anthropic(
5 base_url="https://api.gutsai.id",
6 api_key=os.environ.get("GUTS_API_KEY")
7)
8
9message = client.messages.create(
10 model="claude-sonnet-5.5",
11 max_tokens=1024,
12 system="You are an expert programming assistant.",
13 messages=[
14 {"role": "user", "content": "Write a thread-safe LRU Cache in Go."}
Providers have outages, rate limits and slow periods. Guts AI handles them on the server: every model id you call is backed by a routing chain that Guts configures, and the gateway fails over along that chain so your client gets one response.
No client-side fallback needed
You send one request with one model id. If a provider or key fails, the next one in the chain is tried, and you get a single response, or a single error if every option fails.
How automatic fallback works
Each public model id is a routing chain in the Guts router. The chain lists the provider connections that can serve that model, in priority order: several providers, several accounts or keys of one provider, or both.
The gateway checks your key, reserves the request's estimated cost from your balance and forwards the request to the router.
The router sends it to the first connection in the chain. If that attempt fails, for example with a rate limit or a provider error, or sends no response headers within its time limit, the router moves on to the next connection.
The first attempt that answers is streamed back to you. You see one response, and the attempts that failed are not billed.
If every connection in the chain fails, you get one error in the format of the endpoint you called, and the hold on your balance is refunded.
Providers and keys behind one model
Popular models are served through more than one provider connection, so a single provider's outage or rate limit does not take the model down. Which connections back a model, and in what order, is configured by Guts and can change at any time without any change on your side: the model id stays the same.
Falling back to another model
There is no request header or parameter for client-chosen fallback models: the chain behind a model id is set by Guts. If you want your application to fall back to a different model id, for example from a large model to a faster one, catch the error and send the request again with the other model:
The Guts AI gateway is a streaming proxy written in Go. A request adds about 11.4 ms of gateway overhead on top of the provider's own time, and streamed tokens are passed on line by line as they arrive.
What the gateway adds
• Gateway overhead:about 11.4 ms per request, measured on successful requests and excluding the provider's own time.
• Streaming: each SSE chunk is flushed to your connection as it arrives, without waiting for the rest of the response.
• Connections: requests to the router reuse kept-alive pooled connections instead of opening a new one each time.
Line-by-line streaming
A proxy that buffers or compresses a response delays every token. Guts AI flushes each chunk to your connection as soon as the provider emits it.
Stage
What happens
Auth & balance hold
Your key is checked and the request's estimated cost is reserved from your balance in one database call.
Dispatch
The request goes to the router over a kept-alive pooled connection, and the router picks a provider from the model's chain.
Streaming relay
Each chunk is flushed to you as it arrives, through Go's http.Flusher, with no queuing or compression.
Settlement
When the response ends, the hold is settled to the request's usage (prompt-cache hits at the lower cache rate on supported models and providers) and the rest is returned to your balance.
High throughput & load capacity
Streams run concurrently without a per-request cap in the gateway. Billing calls are limited per wallet (see Billing), so one busy account cannot slow the others down.
Guts AI passes your requests to model providers and keeps as little of their content as the endpoint you use allows. The Privacy Policy is the binding description; this page summarizes it.
What is stored:
• Chat Completions and Messages: the request goes to the provider and the result streams back; the request and response content are not saved in our database, except encrypted excerpts of requests our safety checks flag (kept up to 90 days to investigate abuse).
• Files: uploads are kept until you delete them or your account.
• Training: we do not use your prompts, outputs or files to train AI models.
Security & privacy specifications
Area
Standard
Implementation
Data in transit
HTTPS, HSTS
The API is served over HTTPS, and responses carry a Strict-Transport-Security header.
Usage records
Metadata only
Billing and usage records hold the model, token counts, cost, timing and status, not prompt or output text.
API keys
SHA-256 lookup, AES-256-GCM at rest
Requests are authenticated by the key's SHA-256 hash. The key itself is stored encrypted (AES-256-GCM) so the Console can show it to you.
Model providers
Provider terms
Request content is sent to the provider that serves the model you choose and is processed under that provider's terms.
Access controls
Rate limiting: API requests are rate limited per account: all keys of an account share one requests-per-minute budget, and you can cap a single key below it in the console. Public endpoints are limited per IP address.
Key rotation: If a key may have leaked, rotate or delete it in the Console.
Guts AI returns standard HTTP status codes with structured JSON error payloads conforming to the OpenAI and Anthropic specifications. Every error provides a machine-readable code, a descriptive message, and an error type.
Failed requests: If a request fails before any output is generated, for example with an upstream timeout or 5xx error, the reservation hold is released and nothing is charged (except a provider policy refusal or content filter, which is billed for the tokens it used). If it fails after output started, it is charged for the usage the provider reported or, when the provider reports none, for an estimate from the request and the output already delivered.
HTTP status codes
Status
Common Codes
Meaning & Resolution
400 Bad Request
invalid_request messages_required
Malformed JSON payload, missing model parameter, empty messages array, or invalid parameters. Verify request payload syntax.
401 Unauthorized
invalid_api_key
API key is missing, malformed, or inactive (error type invalid_request_error; authentication_error on /v1/messages). Provide a valid sk-guts-... key via Authorization: Bearer or x-api-key header.
Account balance is below the minimum reservation hold, or the key reached the usage or spend limit set on it. Top up in rupiah or USDT, or raise the key's limit, in the Console.
The account was suspended or banned under the usage policy, its requests to a model family are paused for a while after repeated provider refusals (pool_cooloff, with Retry-After while the pause has an end; its pool field names the model family: claude, gpt, gpt-image, gemini or provider), the conversation repeats a turn the provider refused (start a new conversation without it), or the prompt was stopped before it reached the provider. Nothing is charged for these. A suspended account gets a Retry-After header and an X-Guts-Account-Status header. Contact [email protected] if you think this is a mistake.
404 Not Found
model_not_found model_offline endpoint_removed
The model ID or endpoint does not exist, the model is offline for now, or the endpoint was removed (use /v1/chat/completions instead). Check available models at /models.
413 Payload Too Large
request_too_large
The request body is over 32 MB. Shrink the payload (for example, send images as URLs) and retry.
429 Too Many Requests
rate_limit_exceeded
Your account reached the requests-per-minute limit: all keys of an account share one budget, and each request is checked against its key's limit (error type rate_limit_error, message Rate limit exceeded. Maximum N requests per minute allowed.). The response carries Retry-After (seconds) and X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (epoch milliseconds). Wait until then and retry.
Upstream provider error, stream interruption, or temporary maintenance; policy_check_unavailable means Guts AI could not check the account's status, so nothing was sent or charged (it carries Retry-After). Reserved funds are automatically refunded; retry after a brief delay.
Developer API errors
The usage, models, keys and transactions endpoints answer errors in this shape: {"error": {"code", "message", "type", "param", "metadata"}}. param names the parameter at fault, when there is one.
Status
Code
When
400
invalid_request
A parameter is missing or invalid (see param), or from/to are too far apart
400
invalid_cursor
The cursor is not one this API returned
400
query_too_broad
/v1/generations or /v1/transactions covers too much history to answer in time (param from). Narrow the range or add filters; do not retry as is
401
invalid_api_key
The key is missing, unknown, revoked, expired or disabled
404
not_found, key_not_found, model_not_found
No such request, key or model on your account
405
—
Wrong method; the Allow header lists the right ones
429
rate_limit_exceeded
Over the endpoint's per-minute budget; wait for Retry-After
503
service_unavailable
The service is busy (Retry-After: 1), /v1/generation or /v1/activity could not be read in time, or a lookup failed (Retry-After: 2). Retry after Retry-After seconds
403
management_key_required
A standard key asked for account-wide data (scope=account, group_by=key, /v1/keys, /v1/transactions)
403
management_key_not_allowed
A management key called a model endpoint; use a standard key
403
management_key_read_only
A read management key tried to change a key
403
session_required
Only the signed-in Console may do this (for example re-enabling a key without limits)
Console only: sign in again, request from the Console itself, or management keys are switched off
409
key_limit_reached, management_key_limit_reached
20 API keys or 5 active management keys already exist
409
key_protected, key_busy
The Telegram store's key cannot be changed that way; a request on the key is in progress
409
key_expired
The key has expired and can no longer be changed
409
management_keys_off, policy_transition_refused
Guts AI operators only: a deprecation setting cannot change while management keys are switched off, a switch cannot move to deny before its Sunset date, or the Sunset date cannot move earlier
Error payload structure
On /v1/messages, every error, including key check errors, uses Anthropic's error format instead: type: "error", error.type, error.message and error.metadata.error_type.
Every other /v1 error, including key checks, image generation and files, returns OpenAI's standard JSON error object:
1{
2"error": {
3"message": "Human-readable explanation of the error.",
4"type": "invalid_request_error",
5"code": "invalid_request",
6"param": null
7 }
8}
Error handling examples
Catching specific error status codes in Python and TypeScript:
Guts AI bills each request against your prepaid balance (shown in USD) in steps: it reserves a hold when the request opens, settles the hold to the request's usage when it ends, and returns the unused part of the hold to your balance in the same transaction. Balances are settled in rupiah; USD amounts are converted at the USDT/IDR market rate, so the USD figure can move slightly with the rate.
What you are charged for: the usage the provider reports for the request. If the provider fails or times out before any output, the whole hold is released (except a provider policy refusal or content filter, which is billed for the tokens it used). If it fails mid-stream, the request is charged for the usage reported or, when none is reported, for an estimate from the request and the output already delivered, and the rest of the hold is released.
Core billing principles
Five principles shape billing:
Input, cache read and output prices: Each model has a price per 1M tokens (shown in USD or rupiah) for input tokens, for prompt-cache reads and for output tokens, as listed in the model catalog. A model with one price bills input and output tokens at that price; its prompt-cache hits can still cost less, as below.
Prompt-cache hits can cost less: On supported models and providers, input tokens the provider serves from its prompt cache (reported as cached tokens in usage) are billed at a lower cache rate instead of the full price; elsewhere they are billed at the full price. Send the same long prefix (system prompt, tools, documents) at the start of your requests to get more cache hits.
Rounded once per request: A request's cost is computed from its token count and rounded up to the next whole Rupiah once, not per token or per bucket.
Atomic hold and settle: Holds and settlements are database transactions, so parallel requests on one balance cannot spend the same balance twice.
No expiry: Balance does not expire while your account remains in good standing (see the Terms).
The 4-step lifecycle architecture
Every inference request follows a deterministic 4-stage lifecycle governed by transactional database locks to protect both user funds and system availability:
Phase
Stage Name
Engine Operation
Description
01
Reservation
estimate.hold()
An atomic balance check calculates an upper-bound estimate based on prompt length and model tariff. The estimated quota is temporarily held in a reserved state without debiting cash from your ledger.
02
Execution
route()
The request goes to the first available provider in the model's chain, with about 11.4 ms of gateway overhead. Streaming chunks (SSE) are relayed to you as they arrive.
03
Settlement
usage * rate
Upon stream completion or socket close, the engine reads the usage the provider reported (or estimates it when none is reported) and computes the cost at the model's price per 1M tokens, with prompt-cache hits at the cache rate (see the formula below).
04
Refund in the same step
balance += unspent
The original hold reservation is released atomically. The settlement fee is debited, and the unused part of the hold is returned to your active balance in the same operation.
Pricing formula & math examples
A request's cost adds each kind of token at its price per 1M tokens: uncached input at the input price, prompt-cache reads at the cache read price and output at the output price. The sum is rounded up to the next whole Rupiah once per request:
Cost Formula
1# Official Guts AI Billing Formula (prices per 1M tokens)
3# A model with one price bills input and output at it (cache_read_price is lower only where prompt-cache pricing applies); cache writes are billed at the input price unless the model lists a cache write price
Example: separate input, cache read and output prices
A coding agent request on a model priced at Rp 1.300 input, Rp 325 cache read and Rp 3.900 output per 1M tokens, with 80,000 prompt tokens of which 79,000 are read from the prompt cache, and 600 output tokens:
Uncached input:1,000 × 1,300 = 1,300,000
Cache reads:79,000 × 325 = 25,675,000
Output:600 × 3,900 = 2,340,000
Calculation:29,315,000 / 1,000,000 = 29.315 → ceil(29.315) = 30, so Rp 30
Example: a first request with nothing cached yet
The first request of a session has no prompt cache to read from. On a model priced at Rp 1.800 input and Rp 5.400 output per 1M tokens, with 4,500 prompt tokens (none cached) and 1,500 output tokens:
Input:4,500 × 1,800 = 8,100,000
Output:1,500 × 5,400 = 8,100,000
Calculation:16,200,000 / 1,000,000 = 16.2 → ceil(16.2) = 17, so Rp 17
Reservation Lifecycle: the hold covers the estimated prompt at the input price plus the output cap at the output price, for example Rp 31 with a 4,096-token cap → Actual debit Rp 17 → Rp 14 returned to your balance at settlement.
Later turns that resend the same prompt prefix are read from the cache at the much lower cache read price, so a whole session costs less than its first request suggests.
Top up in rupiah or USDT (Binance Pay, BEP20)
Top up from the Console in rupiah with QRIS, a bank virtual account or an e-wallet, or in USDT through Binance Pay or the BEP20 network:
Deposit Limits: Rp 10.000 to Rp 1.000.000 per rupiah payment (QRIS, virtual account or e-wallet), and 1 to 100 USDT per Binance Pay or BEP20 payment.
Indonesian Payment Channels (QRIS): Pay a dynamic QRIS code from BCA Mobile, Livin by Mandiri, BRImo, BNI Mobile, CIMB Octo, GoPay, OVO, Dana, ShopeePay, LinkAja, or any QRIS-compliant banking app. Your balance is credited once the payment provider confirms the payment.
Bank virtual account and e-wallet: Pay a BCA, BNI, BRI, Mandiri or CIMB virtual account, or with OVO, DANA or ShopeePay. The fee for each channel is shown before you pay, and the payment is credited on its own once confirmed.
USDT (Binance Pay or BEP20): After paying, submit the Binance Pay order ID or the BEP20 transaction hash (TXID). The payment is checked with Binance or on BNB Smart Chain and then credited at the rate shown on your invoice. The USDT invoice rate follows the Binance USDT/IDR price less a Rp 300 spread. If that price is briefly unavailable, the last market rate from the past two hours is used; if there is none, USDT top-up pauses for a few minutes and QRIS stays available.
Usage tracking & account balance
Guts AI adheres to strict OpenAI and Anthropic upstream protocol transparency. Request usage metrics are delivered directly inside the standard response body usage object:
Standard JSON Response
1{
2"id": "chatcmpl-guts-8f921a",
3"object": "chat.completion",
4"created": 1787331200,
5"model": "kimi-k3",
6"choices": [
7 {
8"index": 0,
9"message": {
10"role": "assistant",
11"content": "Refactored code executed cleanly."
12 },
13"finish_reason": "stop"
14 }
15 ],
16"usage": {
17"prompt_tokens": 4500,
18"completion_tokens": 1500,
19"total_tokens": 6000
20 }
21}
You can check your current balance and transaction history anytime in the Console Dashboard (gutsverse.com/console).
Frequently asked questions
If every provider in the model's chain fails before the first output token, the whole hold is refunded (except a provider policy refusal or content filter, which is billed for the tokens it used). If the stream breaks after the answer started, there is no failover mid-answer: you are charged only for the tokens already delivered, and the rest of the hold is refunded.
No. Guts AI operates on a pure pay-as-you-go prepaid model. There are no recurring subscription fees, no inactivity penalties, and your balance remains active indefinitely until used.
Yes. Every request takes its own hold on the shared balance, and holds and settlements are atomic database operations, so concurrent requests cannot spend the same balance twice or push it below zero. To keep one busy account from crowding out others, each server process runs only a few billing operations per wallet at a time (four by default); further requests wait their turn for that step instead of failing.
This page summarizes the Guts AI Terms of Service and Privacy Policy. Those pages are the binding versions; where this summary differs, they apply.
1. Accounts & API keys
You sign in with Google, with GitHub, or with a one-time code from our Telegram bot. You can create API keys in the Console, each with its own spend limit and expiry date. Every request made with one of your keys is treated as made by you and charged to your balance. If a key may have leaked, delete or rotate it in the Console.
2. Acceptable use
Use the Service only for lawful purposes. Do not use it to create or distribute malware or attack tooling, denial-of-service traffic, phishing or fraud, or sexual content involving minors, and do not circumvent safety measures, rate limits or spend limits. If your account is terminated for breaking these rules, the remaining balance is forfeited.
3. Billing & top-ups
The Service is prepaid and pay-as-you-go, with no subscriptions. Top up in rupiah with QRIS, a bank virtual account or an e-wallet, or with USDT through Binance Pay or the BNB Smart Chain (BEP20).
Each request is charged at the model rates in the model catalog at the time of the request.
Top-ups are final and non-refundable once credited, except where the law requires a refund.
Balance does not expire while your account remains in good standing.
4. Privacy & data
Chat Completions and Messages requests are passed to the model provider and normal requests are not saved in our database; excerpts of requests our safety checks flag are kept encrypted for up to 90 days to investigate abuse. Uploaded files are kept until you delete them. Usage records hold token counts, cost and timing, not prompt content. We do not use your prompts, outputs or files to train AI models. The Privacy Policy has the full details.
5. Availability
Guts AI uses multi-provider routing and failover, but outages at upstream providers or on the network can still affect the Service. The Service is provided "as is" and "as available".
Connect Guts AI seamlessly to popular AI agent orchestration frameworks including LangChain (Python/JS) and LlamaIndex using standard OpenAI wrapper classes.
LangChain Python example
1from langchain_openai import ChatOpenAI
2import os
3
4llm = ChatOpenAI(
5 model="claude-sonnet-5.5",
6 openai_api_base="https://api.gutsai.id/v1",
7 openai_api_key=os.environ.get("GUTS_API_KEY"),
8 temperature=0.3
9)
10
11response = llm.invoke("Summarize the benefits of a unified multi-model AI gateway.")
12print(response.content)
1import { ChatOpenAI } from "@langchain/openai";
2
3const model = new ChatOpenAI({
4 modelName: "claude-sonnet-5.5",
5 configuration: {
6 baseURL: "https://api.gutsai.id/v1",
7 apiKey: process.env.GUTS_API_KEY,
8 },
9 temperature: 0.3,
10});
11
12const response = await model.invoke("Summarize the benefits of a unified multi-model AI gateway.");
13console.log(response.content);
LlamaIndex Python example
1from llama_index.llms.openai import OpenAI
2import os
3
4llm = OpenAI(
5 model="claude-sonnet-5.5",
6 api_base="https://api.gutsai.id/v1",
7 api_key=os.environ.get("GUTS_API_KEY"),
8 temperature=0.2
9)
10
11response = llm.complete("Explain Retrieval-Augmented Generation (RAG) in simple terms.")
Use Guts AI frontier models directly inside Cursor IDE for AI code completion, multi-file edits, and agent composer workflows. Guts AI provides OpenAI-compatible endpoints.
Quick Setup Summary:
• Base URL:https://api.gutsai.id/v1
• API Key:sk-guts-... (from Developer Console)
• Recommended Model:claude-sonnet-5.5 or claude-sonnet-5
Step-by-step configuration
Open Cursor and navigate to Cursor Settings → Models (or press Ctrl/Cmd + Shift + J).
Scroll down to the OpenAI API Key section.
Enter your secret key: sk-guts-....
Toggle Override OpenAI Base URL to ON.
Set the Base URL to: https://api.gutsai.id/v1.
Click the Verify button to test connectivity.
Under Model Names, click Add Model and enter your preferred model IDs:
claude-sonnet-5.5 (Recommended for primary coding & composer)
Composer Best Practice: In Cursor Composer (Cmd + I), selecting claude-sonnet-5.5 provides the optimal balance of intelligence, speed, and cost efficiency for multi-file edits.
Connect autonomous VS Code coding extensions Cline and Roo Code directly to Guts AI for autonomous multi-file editing, workspace indexing, and terminal command execution.
Settings configuration
Open the Cline / Roo Code settings panel in VS Code and configure the API provider as follows:
Setting Field
Value to Set
Description
API Provider
OpenAI Compatible
Select OpenAI Compatible from the dropdown provider list.
Hermes Agent is Nous Research's autonomous, self-improving AI agent framework designed for deep software engineering, system administration, and multi-agent coordination. Hermes connects to Guts AI through the OpenAI-compatible /v1/chat/completions endpoint.
What Guts AI provides:
Tool calling and SSE streaming on /v1/chat/completions. Hermes features such as subagent delegation (delegate_task), cross-session memory and worktree isolation (-w) run in Hermes itself; Guts AI serves the model calls they make. Tool use depends on the model you select.
Configuration & setup
Configure Hermes by editing ~/.hermes/config.yaml or running interactive CLI commands:
1# ~/.hermes/config.yaml
2model:
3 default: "guts/claude-sonnet-5.5"
4 provider: "custom"
5 base_url: "https://api.gutsai.id/v1"
6 api_key: "sk-guts-your-api-key"
7 context_length: 200000
8
9# Auxiliary models for specialized subtasks (vision, compression, memory)
10auxiliary:
11 vision:
12 provider: "custom"
13 model: "claude-sonnet-5.5"
14 compression:
15 provider: "custom"
16 model: "deepseek-v4-pro"
1# 1. Set API Key & Base URL in ~/.hermes/.env or via CLI
2hermes config set model.base_url "https://api.gutsai.id/v1"
3hermes config set model.api_key "sk-guts-your-api-key"
4hermes config set model.default "claude-sonnet-5.5"
5
6# 2. Launch Interactive Hermes TUI
7hermes
8
9# 3. One-Shot Autonomous Task Execution
10hermes chat -q "Audit backend security and refactor auth middleware"
Claude Code is Anthropic's official agentic command-line interface for autonomous software engineering. Claude Code connects to Guts AI through the Anthropic-compatible /v1/messages endpoint.
Anthropic Messages format:
Guts AI accepts the Messages requests Claude Code sends, including thinking budgets, system prompt arrays and content blocks. Multi-file refactoring, MCP tools and slash commands run in Claude Code itself; Guts AI serves the model calls they make.
Configuration & environment
Configure Claude Code by placing your credentials in ~/.claude/settings.json or exporting environment variables:
OpenClaw is an autonomous web automation, data extraction, and crawler framework. OpenClaw connects to Guts AI as an OpenAI-compatible model provider.
Automation & vision:
OpenClaw operations such as DOM inspection, screenshot extraction, fallback pipelines and parallel batch workers run in OpenClaw; Guts AI serves the model calls they make. Screenshot steps need a model with image input, shown in the model catalog.
Configuration (openclaw.json)
Add Guts AI to ~/.openclaw/openclaw.json under models.providers:
Pi Coding Agent (by Mario Zechner, pi.dev) is a minimalist, ultra-fast terminal coding assistant. Pi connects to Guts AI through the OpenAI-compatible endpoint.
Context & extensions:
Pi features such as differential TUI rendering, AGENTS.md / SYSTEM.md context and custom TypeScript extensions run in Pi itself; Guts AI serves the model calls they make.
Setup & running Pi
Configure standard OpenAI environment variables or customize ~/.pi/config.json:
1// ~/.pi/config.json or Project Root AGENTS.md / SYSTEM.md
Changes to the Guts AI API, models, billing and console, newest first. Breaking changes are labelled. Follow along with the RSS feed.
December 2026
API
Request bodies up to 32 MB
Requests can now carry bodies of up to 32 MB, up from 10 MB, so long agent sessions and large attachments fit in one call. A larger body gets 413 request_too_large.
deepseek-v4.1-flash-1017:free is live at no cost until Dec 8, with a 1M-token context, configurable reasoning effort and tool calling. Free capacity is shared and may be rate limited at peak times.
Create a management key in the console to list, create, limit, disable and delete API keys over HTTP with /v1/keys, and read your account's top-ups with /v1/transactions. A management key cannot call models.
Every /v1 error now uses the OpenAI error format, except /v1/messages, which keeps Anthropic's. An invalid key returns 401 with code invalid_api_key as JSON instead of plain text. Response IDs now look like chatcmpl-… and msg_…, and /v1/generation accepts them.
Three more Claude models are live in the catalog: claude-fable-5.1, claude-opus-4.8 and claude-opus-5. Call them through /v1/chat/completions or /v1/messages.
The console now ranks accounts by tokens and requests, this month and all time. Names are masked, and you can leave the board or hide your photo at any time.
The Responses API endpoint is no longer served and returns 404 endpoint_removed. Use /v1/chat/completions with OpenAI SDKs or /v1/messages with Anthropic SDKs; both support tools, streaming and reasoning.