New GPT-6.2 Sol is live. Same key. View in catalog

Guts AI documentation

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.

Base URLs

  • OpenAIPOSThttps://api.gutsai.id/v1/chat/completions
  • AnthropicPOSThttps://api.gutsai.id/v1/messages

Supported endpoints

EndpointBest forFeatures
/v1/chat/completionsOpenAI compatible Standard AI frameworks, Cursor, Cline, OpenCode, LangChain, Vercel AI SDK
  • SSE streaming
  • Tool calling
  • Structured JSON
  • Reasoning tokens
  • Vision
/v1/messagesAnthropic compatible Official Anthropic SDKs, Claude Code CLI, Roo Code
  • Thinking budgets
  • System prompt arrays
  • Content blocks
  • Stop sequences
/v1/images/generationsOpenAI compatible Image models such as gpt-image-2.5, billed per image
  • OpenAI Images SDK calls
  • No charge when the provider rejects a prompt for safety
/v1/filesOpenAI compatible Uploading files to reference in requests
  • Upload, list, read and delete
  • Kept until you delete them
/v1/models, /v1/key, /v1/credits, /v1/generation, /v1/generations, /v1/activity, /v1/keys, /v1/transactions Model discovery and account checks from code (Usage & account API, Models API)
  • Model list with prices, and each model's live performance
  • Key limits and usage
  • Balance
  • One request's tokens and cost (?id= takes the answer's id or its X-Request-Id), request history and daily activity
  • API key management with a management key

Core architecture principles

Per-token pricing, flexible payments

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."}
14 ],
15 temperature=0.7
16)
17
18print(response.choices[0].message.content)
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 main() {
9 const completion = await openai.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." }
14 ],
15 });
16
17 console.log(completion.choices[0].message.content);
18}
19
20main();
1package main
2
3import (
4 "bytes"
5 "encoding/json"
6 "fmt"
7 "io"
8 "net/http"
9 "os"
10)
11
12func main() {
13 payload := map[string]interface{}{
14 "model": "claude-sonnet-5.5",
15 "messages": []map[string]string{
16 {"role": "user", "content": "Explain quantum computing in one sentence."},
17 },
18 }
19 body, _ := json.Marshal(payload)
20
21 req, _ := http.NewRequest("POST", "https://api.gutsai.id/v1/chat/completions", bytes.NewBuffer(body))
22 req.Header.Set("Authorization", "Bearer "+os.Getenv("GUTS_API_KEY"))
23 req.Header.Set("Content-Type", "application/json")
24
25 resp, err := http.DefaultClient.Do(req)
26 if err != nil {
27 panic(err)
28 }
29 defer resp.Body.Close()
30
31 respBody, _ := io.ReadAll(resp.Body)
32 fmt.Println(string(respBody))
33}
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.

Quickstart

Send your first inference request in under two minutes using official OpenAI client libraries, Anthropic SDKs, TypeScript, Go, or raw cURL.

Before running snippets, obtain your secret API key starting with sk-guts-... from the Developer Console.

Send a chat completion

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."}
14 ],
15 temperature=0.7
16)
17
18print(response.choices[0].message.content)
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 main() {
9 const completion = await openai.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." }
14 ],
15 });
16
17 console.log(completion.choices[0].message.content);
18}
19
20main();
1package main
2
3import (
4 "bytes"
5 "encoding/json"
6 "fmt"
7 "io"
8 "net/http"
9 "os"
10)
11
12func main() {
13 payload := map[string]interface{}{
14 "model": "claude-sonnet-5.5",
15 "messages": []map[string]string{
16 {"role": "user", "content": "Explain quantum computing in one sentence."},
17 },
18 }
19 body, _ := json.Marshal(payload)
20
21 req, _ := http.NewRequest("POST", "https://api.gutsai.id/v1/chat/completions", bytes.NewBuffer(body))
22 req.Header.Set("Authorization", "Bearer "+os.Getenv("GUTS_API_KEY"))
23 req.Header.Set("Content-Type", "application/json")
24
25 resp, err := http.DefaultClient.Do(req)
26 if err != nil {
27 panic(err)
28 }
29 defer resp.Body.Close()
30
31 respBody, _ := io.ReadAll(resp.Body)
32 fmt.Println(string(respBody))
33}

Example JSON response

1{
2 "id": "chatcmpl-guts-9a28f731e0b",
3 "object": "chat.completion",
4 "created": 1740000000,
5 "model": "claude-sonnet-5.5",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "content": "Quantum computing harnesses the principles of superposition and entanglement to perform complex calculations exponentially faster than classical computers."
12 },
13 "finish_reason": "stop"
14 }
15 ],
16 "usage": {
17 "prompt_tokens": 24,
18 "completion_tokens": 28,
19 "total_tokens": 52
20 }
21}

Recommended next steps

Explore the full breadth of Guts AI capabilities:

Authentication & API keys

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).

Quick Authentication Reference:
• OpenAI Standard: Authorization: Bearer sk-guts-...
• Anthropic Native SDK: x-api-key: sk-guts-...
• Console Management: Manage & rotate keys at gutsverse.com/console

Obtaining your API key

  1. Navigate to the Developer Console.
  2. Top up your balance in rupiah with QRIS, a bank virtual account or an e-wallet (from Rp 10.000), or in USDT via Binance Pay or BEP20 (from 1 USDT).
  3. Copy your generated secret key formatted as sk-guts-....

Setting up environment variables

Export your secret API key in your terminal or store it in your project's .env file:

1# Add to ~/.bashrc or ~/.zshrc
2export GUTS_API_KEY="sk-guts-your-secret-api-key-here"
3export OPENAI_BASE_URL="https://api.gutsai.id/v1"
4export OPENAI_API_KEY="$GUTS_API_KEY"
5export ANTHROPIC_BASE_URL="https://api.gutsai.id"
6export ANTHROPIC_API_KEY="$GUTS_API_KEY"
1# .env file
2GUTS_API_KEY=sk-guts-your-secret-api-key-here
3OPENAI_BASE_URL=https://api.gutsai.id/v1
4OPENAI_API_KEY=sk-guts-your-secret-api-key-here
5ANTHROPIC_BASE_URL=https://api.gutsai.id
6ANTHROPIC_API_KEY=sk-guts-your-secret-api-key-here

Header specifications

Header Type Description
Authorization string 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.
1client = OpenAI(
2 base_url="https://api.gutsai.id/v1",
3 api_key=os.environ["GUTS_API_KEY"],
4 default_headers={"HTTP-Referer": "https://your-app.example", "X-Guts-Title": "Your App"},
5)
1const client = new OpenAI({
2 baseURL: "https://api.gutsai.id/v1",
3 apiKey: process.env.GUTS_API_KEY,
4 defaultHeaders: { "HTTP-Referer": "https://your-app.example", "X-Guts-Title": "Your App" },
5});

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.

Model catalog & pricing

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();

Here are some model IDs available on Guts AI. Current prices, in USD or rupiah, are on the Models page.

Model ID Provider
claude-sonnet-5.5 Anthropic
claude-sonnet-5 Anthropic
claude-opus-5 Anthropic
gpt-5.6-luna OpenAI
deepseek-v4-pro DeepSeek
gemini-3.8-flash Google
kimi-k3 Moonshot AI
qwen-3.8-max Alibaba
gpt-image-2.5 OpenAI (images)

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.

EndpointRequests per minute
GET /v1/key, GET /v1/credits60
GET /v1/generation, GET /v1/generations120
GET /v1/activity30

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.

1curl "https://api.gutsai.id/v1/key" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/key",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/key", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
1{
2 "data": {
3 "label": "sk-guts-ab12…9f3e",
4 "limit": 10.0,
5 "limit_rp": 160000,
6 "limit_remaining": 7.5,
7 "limit_remaining_rp": 120000,
8 "limit_reset": "monthly",
9 "usage": 2.5,
10 "usage_rp": 40000,
11 "usage_daily": 0.1,
12 "usage_daily_rp": 1600,
13 "usage_weekly": 0.9,
14 "usage_weekly_rp": 14400,
15 "usage_monthly": 2.5,
16 "usage_monthly_rp": 40000,
17 "is_free_tier": false,
18 "is_management_key": false,
19 "rate_limit": { "requests": 60, "interval": "1m", "scope": "account" },
20 "expires_at": null,
21 "balance": 12.4,
22 "balance_rp": 198400
23 }
24}

Amounts in USD are null when no exchange rate is set; the _rp fields always carry the rupiah value.

Read your credits

GET https://api.gutsai.id/v1/credits

Returns everything credited to the account, everything spent, and the balance.

1curl "https://api.gutsai.id/v1/credits" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/credits",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/credits", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
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.

1curl "https://api.gutsai.id/v1/generation?id=req_5f1c0e9b2a7d4c3e8f901a2b" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/generation",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 params={"id": "req_5f1c0e9b2a7d4c3e8f901a2b"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/generation?id=req_5f1c0e9b2a7d4c3e8f901a2b", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
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}
FieldMeaning
statusok, error or aborted (the client closed the connection; cancelled is then true)
tokens_prompt, tokens_completionBilled input and output tokens; the native_ fields repeat them, plus cached and cache-write input tokens
latencyWhole request, in milliseconds
generation_time, ttftTime spent generating, and time to the first token of a streamed answer, in milliseconds (null when not measured)
total_cost, usageThe charge in USD (null without an exchange rate)
cost_rpThe charge in rupiah
finish_reasonWhy the answer ended; native_finish_reason carries the same value
errorWhat went wrong, for a request that did not succeed; null otherwise
appThe 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.

ParameterDescription
limit1 to 100 items per page (default 20)
cursorThe next_cursor of the previous page
from, toAn 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)
modelOnly this model id
statussuccess, error or cancelled
idOnly the request with this id (as for /v1/generation)
api_key_id, api_key_hashManagement keys only: one key of the account, by id or by its SHA-256 hash
1curl "https://api.gutsai.id/v1/generations?limit=50&status=error" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/generations",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 params={"limit": "50", "status": "error"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/generations?limit=50&status=error", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
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 status error and cost_rp 0. 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.

ParameterDescription
dateOne day inside the window (YYYY-MM-DD, UTC)
modelOnly this model id
scopeManagement keys: account (default) or key
group_byManagement keys: model (default) or key, which adds api_key_id and api_key_name
api_key_id, api_key_hashManagement keys: one key of the account
1curl "https://api.gutsai.id/v1/activity?date=2026-12-03" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/activity",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 params={"date": "2026-12-03"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/activity?date=2026-12-03", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
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.

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.

1curl "https://api.gutsai.id/v1/models" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/models",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/models", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);

Count models

GET https://api.gutsai.id/v1/models/count
1curl "https://api.gutsai.id/v1/models/count" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/models/count",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/models/count", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
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.

1curl "https://api.gutsai.id/v1/models/gpt-5.5/endpoints" \
2 -H "Authorization: Bearer $GUTS_API_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/models/gpt-5.5/endpoints",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_API_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/models/gpt-5.5/endpoints", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_API_KEY}` },
3});
4if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
5const { data } = await res.json();
6console.log(data);
1{
2 "data": {
3 "id": "gpt-5.5",
4 "name": "GPT-5.5",
5 "created": 1764547200,
6 "description": "…",
7 "architecture": { "input_modalities": ["text", "image"], "output_modalities": ["text"] },
8 "endpoints": [
9 {
10 "name": "OpenAI | gpt-5.5",
11 "model_name": "GPT-5.5",
12 "provider_name": "OpenAI",
13 "tag": "guts",
14 "context_length": 400000,
15 "max_completion_tokens": 128000,
16 "pricing": { "prompt": "0.00000125", "completion": "0.00001" },
17 "supported_parameters": ["max_tokens", "tools", "tool_choice"],
18 "status": 0,
19 "uptime_last_5m": 100.0,
20 "uptime_last_30m": 99.2,
21 "uptime_last_1d": 99.6,
22 "latency_last_30m": { "p50": 820, "p75": 1100, "p90": 1900, "p99": 4200 },
23 "ttft_last_30m": { "p50": 310, "p75": 420, "p90": 700, "p99": 1500 },
24 "throughput_last_30m": { "p50": 71.3, "p75": 64.0, "p90": 48.2, "p99": 21.9 },
25 "throughput_basis": "generation",
26 "stats_updated_at": "2026-12-08T03:12:00Z"
27 }
28 ]
29 }
30}
FieldMeaning
status0 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_30mShare of successful requests, in percent; null with fewer than 3 requests
uptime_last_1dThe same over the last 24 hourly buckets (the current hour included); null for an inactive model
latency_last_30mWhole-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_30mTime to the first token of streamed requests, in milliseconds, read the same way
throughput_last_30mOutput 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_basisgeneration: 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.

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.
AccessCan do
readGET on every endpoint below
fullEverything 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.

1curl "https://api.gutsai.id/v1/activity?group_by=key" \
2 -H "Authorization: Bearer $GUTS_MANAGEMENT_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/activity",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_MANAGEMENT_KEY']}"},
7 params={"group_by": "key"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/activity?group_by=key", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_MANAGEMENT_KEY}` },
3});
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.

1curl "https://api.gutsai.id/v1/keys" \
2 -H "Authorization: Bearer $GUTS_MANAGEMENT_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/keys",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_MANAGEMENT_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/keys", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_MANAGEMENT_KEY}` },
3});
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 "id": "9f2c1a7e",
6 "hash": "3b1f…e07a",
7 "name": "backend",
8 "label": "sk-guts-ab12…9f3e",
9 "disabled": false,
10 "limit": 10.0,
11 "limit_rp": 160000,
12 "limit_remaining": 7.5,
13 "limit_remaining_rp": 120000,
14 "limit_reset": "monthly",
15 "usage": 2.5,
16 "usage_rp": 40000,
17 "usage_daily": 0.1,
18 "usage_daily_rp": 1600,
19 "usage_weekly": 0.9,
20 "usage_weekly_rp": 14400,
21 "usage_monthly": 2.5,
22 "usage_monthly_rp": 40000,
23 "rate_limit": { "requests": 60, "interval": "1m" },
24 "rpm_limit": 60,
25 "is_bot_key": false,
26 "created_at": "2026-12-01T08:00:00Z",
27 "updated_at": null,
28 "last_used_at": "2026-12-03T10:12:44Z",
29 "expires_at": null
30 }
31 ],
32 "has_more": false,
33 "next_cursor": null
34}

Create a key

1curl -X POST "https://api.gutsai.id/v1/keys" \
2 -H "Authorization: Bearer $GUTS_MANAGEMENT_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"name": "ci", "limit_rp": 100000, "limit_reset": "monthly"}'
1import os
2import requests
3
4resp = requests.post(
5 "https://api.gutsai.id/v1/keys",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_MANAGEMENT_KEY']}"},
7 json={"name": "ci", "limit_rp": 100000, "limit_reset": "monthly"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/keys", {
2 method: "POST",
3 headers: { Authorization: `Bearer ${process.env.GUTS_MANAGEMENT_KEY}`, "Content-Type": "application/json" },
4 body: JSON.stringify({"name": "ci", "limit_rp": 100000, "limit_reset": "monthly"}),
5});
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.

FieldDescription
nameRequired, 1 to 64 characters
limit or limit_rpA 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_resetdaily, 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_limitA cap on the key's requests per minute, or null
expires_atA 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.

Change a key

1curl -X PATCH "https://api.gutsai.id/v1/keys/9f2c1a7e" \
2 -H "Authorization: Bearer $GUTS_MANAGEMENT_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"rpm_limit": 30, "expires_at": "2027-01-31"}'
1import os
2import requests
3
4resp = requests.patch(
5 "https://api.gutsai.id/v1/keys/9f2c1a7e",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_MANAGEMENT_KEY']}"},
7 json={"rpm_limit": 30, "expires_at": "2027-01-31"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/keys/9f2c1a7e", {
2 method: "PATCH",
3 headers: { Authorization: `Bearer ${process.env.GUTS_MANAGEMENT_KEY}`, "Content-Type": "application/json" },
4 body: JSON.stringify({"rpm_limit": 30, "expires_at": "2027-01-31"}),
5});
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.

Delete a key

1curl -X DELETE "https://api.gutsai.id/v1/keys/9f2c1a7e" \
2 -H "Authorization: Bearer $GUTS_MANAGEMENT_KEY"
1import os
2import requests
3
4resp = requests.delete(
5 "https://api.gutsai.id/v1/keys/9f2c1a7e",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_MANAGEMENT_KEY']}"},
7 timeout=30,
8)
9resp.raise_for_status()
10print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/keys/9f2c1a7e", {
2 method: "DELETE",
3 headers: { Authorization: `Bearer ${process.env.GUTS_MANAGEMENT_KEY}` },
4});
5if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
6const { data } = await res.json();
7console.log(data);
1{ "data": { "id": "9f2c1a7e", "deleted": true } }

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.

ParameterDescription
limit, cursor1 to 100 per page (default 20); the previous page's next_cursor
statusall (default), pending, paid or cancelled
methodA payment method, for example qris
from, toAn RFC 3339 time or a date; to is exclusive, a date includes that day
1curl "https://api.gutsai.id/v1/transactions?status=paid" \
2 -H "Authorization: Bearer $GUTS_MANAGEMENT_KEY"
1import os
2import requests
3
4resp = requests.get(
5 "https://api.gutsai.id/v1/transactions",
6 headers={"Authorization": f"Bearer {os.environ['GUTS_MANAGEMENT_KEY']}"},
7 params={"status": "paid"},
8 timeout=30,
9)
10resp.raise_for_status()
11print(resp.json()["data"])
1const res = await fetch("https://api.gutsai.id/v1/transactions?status=paid", {
2 headers: { Authorization: `Bearer ${process.env.GUTS_MANAGEMENT_KEY}` },
3});
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 "id": "QR-20261203-8F2A",
6 "object": "transaction",
7 "type": "deposit",
8 "method": "qris",
9 "status": "paid",
10 "amount_rp": 100000,
11 "fee_rp": 350,
12 "total_rp": 100350,
13 "amount_usd": 6.25,
14 "amount_usdt": null,
15 "currency": "IDR",
16 "created_at": "2026-12-03T09:01:22Z",
17 "paid_at": "2026-12-03T09:02:10Z"
18 }
19 ],
20 "has_more": false,
21 "next_cursor": null
22}

type is deposit or conversion (a Telegram store balance moved to the account).

Chat completions

Standard OpenAI-compatible chat completion endpoint supporting streaming, tool calling, JSON schema mode, multi-turn conversations, and reasoning token extraction.

https://api.gutsai.id/v1/chat/completions

Request body parameters

Parameter Type Description
model required string ID of the model to use (e.g. claude-sonnet-5.5, gpt-5.6-luna, deepseek-v4-pro).
messages required array A list of message objects with role (system, user, assistant, tool) and content.
stream boolean If true, partial message deltas will be sent as Server-Sent Events (SSE). Default: false.
temperature number Sampling temperature between 0.0 and 2.0. Higher values make output more random.
max_tokens integer The maximum number of tokens to generate in the completion.
tools array A list of tool definitions the model may call. See Tool Calling.
response_format object An object specifying the format that the model must output (e.g. {"type": "json_object"}).

Code example

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 a senior systems architect."},
13 {"role": "user", "content": "Design a resilient database failover strategy."}
14 ],
15 temperature=0.4,
16 max_tokens=1000
17)
18
19print(response.choices[0].message.content)
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 run() {
9 const completion = await openai.chat.completions.create({
10 model: "claude-sonnet-5.5",
11 messages: [
12 { role: "system", content: "You are a senior systems architect." },
13 { role: "user", content: "Design a resilient database failover strategy." }
14 ],
15 });
16
17 console.log(completion.choices[0].message.content);
18}
19
20run();
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 a senior systems architect."},
8 {"role": "user", "content": "Design a resilient database failover strategy."}
9 ]
10 }'

Tool & function calling

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}")
41 print(f"Arguments: {tool_call.function.arguments}")
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.

Structured JSON outputs

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."}
14 ],
15 response_format={
16 "type": "json_schema",
17 "json_schema": {
18 "name": "user_profile",
19 "strict": True,
20 "schema": {
21 "type": "object",
22 "properties": {
23 "name": {"type": "string"},
24 "email": {"type": "string"},
25 "age": {"type": "integer"}
26 },
27 "required": ["name", "email", "age"],
28 "additionalProperties": False
29 }
30 }
31 }
32)
33
34print(response.choices[0].message.content)
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 extractUser() {
9 const completion = await openai.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." }
14 ],
15 response_format: { type: "json_object" },
16 });
17
18 const parsed = JSON.parse(completion.choices[0].message.content || "{}");
19 console.log(parsed);
20}
21
22extractUser();

JSON mode best practices

  • Always instruct the model in your system prompt to output valid JSON.
  • Handle schema validation gracefully in case upstream token truncation limits are reached.

Reasoning & thinking tokens

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:
19 print(delta.reasoning_content, end="", flush=True)
20 elif delta.content:
21 print(delta.content, end="", flush=True)

Anthropic thinking budgets

When calling Anthropic endpoints directly (via /v1/messages), you can specify explicit reasoning budgets with thinking: {"type": "enabled", "budget_tokens": 4096}.

Streaming & SSE

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."}
8 ],
9 "stream": true
10 }'

Raw SSE stream chunk structure

1data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1740000000,"model":"claude-sonnet-5.5","choices":[{"index":0,"delta":{"content":"Packets"},"finish_reason":null}]}
2
3data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1740000000,"model":"claude-sonnet-5.5","choices":[{"index":0,"delta":{"content":" fly"},"finish_reason":null}]}
4
5data: [DONE]

Messages API

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
model required string Model ID (e.g. claude-sonnet-5.5, claude-sonnet-5, claude-opus-5).
messages required array Array of input messages (roles: user, assistant).
max_tokens required 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."}
15 ]
16)
17
18print(message.content[0].text)
1import Anthropic from "@anthropic-ai/sdk";
2
3const anthropic = new Anthropic({
4 baseURL: "https://api.gutsai.id",
5 apiKey: process.env.GUTS_API_KEY,
6});
7
8async function main() {
9 const message = await anthropic.messages.create({
10 model: "claude-sonnet-5.5",
11 max_tokens: 1024,
12 messages: [
13 { role: "user", content: "Write a thread-safe LRU Cache in TypeScript." }
14 ],
15 });
16
17 console.log(message.content[0]);
18}
19
20main();
1curl -X POST "https://api.gutsai.id/v1/messages" \
2 -H "x-api-key: $GUTS_API_KEY" \
3 -H "anthropic-version: 2023-06-01" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "model": "claude-sonnet-5.5",
7 "max_tokens": 1024,
8 "messages": [
9 {"role": "user", "content": "Hello Claude via Guts AI!"}
10 ]
11 }'

Model routing & failover

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.

  1. The gateway checks your key, reserves the request's estimated cost from your balance and forwards the request to the router.
  2. 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.
  3. The first attempt that answers is streamed back to you. You see one response, and the attempts that failed are not billed.
  4. 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:

1import os
2from openai import OpenAI, APIStatusError
3
4client = OpenAI(base_url="https://api.gutsai.id/v1", api_key=os.environ["GUTS_API_KEY"])
5messages = [{"role": "user", "content": "Analyze and refactor this concurrent Go pipeline."}]
6
7# Your own order of model ids; each one already fails over inside Guts.
8for model in ["claude-opus-5", "claude-sonnet-5"]:
9 try:
10 response = client.chat.completions.create(model=model, messages=messages)
11 break
12 except APIStatusError as err:
13 if err.status_code != 429 and err.status_code < 500:
14 raise
15
16print(response.choices[0].message.content)
1import OpenAI from "openai";
2
3const client = new OpenAI({ baseURL: "https://api.gutsai.id/v1", apiKey: process.env.GUTS_API_KEY });
4const messages = [{ role: "user" as const, content: "Analyze and refactor this concurrent Go pipeline." }];
5
6async function complete() {
7 for (const model of ["claude-opus-5", "claude-sonnet-5"]) {
8 try {
9 return await client.chat.completions.create({ model, messages });
10 } catch (err) {
11 if (!(err instanceof OpenAI.APIError) || (err.status !== 429 && (err.status ?? 0) < 500)) throw err;
12 }
13 }
14 throw new Error("every model failed");
15}

What you see when something fails

Situation What Guts does What you get
Rate limit (429) or error at one provider or key The router tries the next connection in the chain One normal response
A provider does not start answering Each attempt gets up to about two minutes to send response headers, then the router moves on One normal response, later
Every connection in the chain fails The gateway returns one error (model_unavailable, with the upstream status) An error; the hold is refunded
No response at all within five minutes The gateway ends the request with upstream_timeout (HTTP 504) An error; the hold is refunded
The stream stops after the answer started, or sends nothing for five minutes No failover in the middle of an answer: the stream ends with an error event The tokens already delivered are billed and the rest of the hold is refunded

Gateway latency

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.

Enterprise security

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.

Errors & status codes

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.
402 Payment Required insufficient_balance
key_max_usage_reached
key_spend_limit_reached
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.
403 Forbidden account_suspended
account_banned
pool_cooloff
conversation_flagged
content_screened
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.
502 / 503 / 504 Server Error model_unavailable
service_unavailable
upstream_timeout
policy_check_unavailable
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.

StatusCodeWhen
400invalid_requestA parameter is missing or invalid (see param), or from/to are too far apart
400invalid_cursorThe cursor is not one this API returned
400query_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
401invalid_api_keyThe key is missing, unknown, revoked, expired or disabled
404not_found, key_not_found, model_not_foundNo such request, key or model on your account
405—Wrong method; the Allow header lists the right ones
429rate_limit_exceededOver the endpoint's per-minute budget; wait for Retry-After
503service_unavailableThe 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
403management_key_requiredA standard key asked for account-wide data (scope=account, group_by=key, /v1/keys, /v1/transactions)
403management_key_not_allowedA management key called a model endpoint; use a standard key
403management_key_read_onlyA read management key tried to change a key
403session_requiredOnly the signed-in Console may do this (for example re-enabling a key without limits)
403reauth_required, forbidden_origin, management_keys_disabledConsole only: sign in again, request from the Console itself, or management keys are switched off
409key_limit_reached, management_key_limit_reached20 API keys or 5 active management keys already exist
409key_protected, key_busyThe Telegram store's key cannot be changed that way; a request on the key is in progress
409key_expiredThe key has expired and can no longer be changed
409management_keys_off, policy_transition_refusedGuts 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:

1import openai
2
3client = openai.OpenAI(base_url="https://api.gutsai.id/v1", api_key="sk-guts-...")
4
5try:
6 response = client.chat.completions.create(
7 model="claude-sonnet-5.5",
8 messages=[{"role": "user", "content": "Hello!"}]
9 )
10 print(response.choices[0].message.content)
11except openai.AuthenticationError:
12 print("Authentication failed: Check your sk-guts-... API key in https://gutsverse.com/console")
13except openai.RateLimitError:
14 print("Rate limit reached: Please back off and retry after delay.")
15except openai.APIStatusError as e:
16 if e.status_code == 402:
17 print("Insufficient balance: top up in /console")
18 elif e.status_code == 400:
19 print(f"Invalid request: {e.message}")
20 else:
21 print(f"API error: {e.message} (status: {e.status_code})")
1import OpenAI from 'openai';
2
3const client = new OpenAI({
4 baseURL: 'https://api.gutsai.id/v1',
5 apiKey: process.env.GUTS_API_KEY
6});
7
8try {
9 const res = await client.chat.completions.create({
10 model: 'claude-sonnet-5.5',
11 messages: [{ role: 'user', content: 'Hello!' }]
12 });
13 console.log(res.choices[0].message.content);
14} catch (err) {
15 if (err instanceof OpenAI.AuthenticationError) {
16 console.error('Invalid Guts API key. Check https://gutsverse.com/console');
17 } else if (err instanceof OpenAI.APIError && err.status === 402) {
18 console.error('Insufficient balance: Top up your balance in /console');
19 } else {
20 console.error('API Error:', err);
21 }
22}

Billing & lifecycle

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)
2Total_Cost_IDR = ceil( ((prompt_tokens - cached_tokens) * input_price + cached_tokens * cache_read_price + completion_tokens * output_price) / 1_000_000 )
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
4# Messages API: prompt_tokens = input_tokens + cache_creation_input_tokens + cache_read_input_tokens, cached_tokens = cache_read_input_tokens

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.

Terms of service

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".

LangChain & LlamaIndex

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.")
12print(response.text)

Vercel AI SDK

Integrate Guts AI into Next.js and frontend applications using the Vercel AI SDK (@ai-sdk/openai).

Next.js App Router API route

1import { createOpenAI } from "@ai-sdk/openai";
2import { streamText } from "ai";
3
4const guts = createOpenAI({
5 baseURL: "https://api.gutsai.id/v1",
6 apiKey: process.env.GUTS_API_KEY,
7});
8
9export async function POST(req: Request) {
10 const { messages } = await req.json();
11
12 const result = streamText({
13 model: guts.chat("claude-sonnet-5.5"),
14 messages,
15 });
16
17 return result.toDataStreamResponse();
18}

React client hook (useChat)

1"use client";
2import { useChat } from "ai/react";
3
4export default function ChatPage() {
5 const { messages, input, handleInputChange, handleSubmit } = useChat();
6
7 return (
8 <div className="chat-container">
9 {messages.map((m) => (
10 <div key={m.id} className={m.role === "user" ? "user-msg" : "ai-msg"}>
11 <strong>{m.role}: </strong> {m.content}
12 </div>
13 ))}
14 <form onSubmit={handleSubmit}>
15 <input value={input} onChange={handleInputChange} placeholder="Ask anything..." />
16 <button type="submit">Send</button>
17 </form>
18 </div>
19 );
20}

LiteLLM proxy

Route requests from your centralized LiteLLM proxy instance through Guts AI with full model passthrough and unified billing tracking.

Configuration (config.yaml)

1model_list:
2 - model_name: claude-sonnet-5.5
3 litellm_params:
4 model: openai/claude-sonnet-5.5
5 api_base: https://api.gutsai.id/v1
6 api_key: os.environ/GUTS_API_KEY
7
8 - model_name: deepseek-v4-pro
9 litellm_params:
10 model: openai/deepseek-v4-pro
11 api_base: https://api.gutsai.id/v1
12 api_key: os.environ/GUTS_API_KEY
13
14 - model_name: gpt-5.6-luna
15 litellm_params:
16 model: openai/gpt-5.6-luna
17 api_base: https://api.gutsai.id/v1
18 api_key: os.environ/GUTS_API_KEY

Running LiteLLM CLI

1# Set environment variable
2export GUTS_API_KEY="sk-guts-..."
3
4# Run LiteLLM Proxy on port 4000
5litellm --config config.yaml --port 4000

Cursor IDE

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

  1. Open Cursor and navigate to Cursor Settings → Models (or press Ctrl/Cmd + Shift + J).
  2. Scroll down to the OpenAI API Key section.
  3. Enter your secret key: sk-guts-....
  4. Toggle Override OpenAI Base URL to ON.
  5. Set the Base URL to: https://api.gutsai.id/v1.
  6. Click the Verify button to test connectivity.
  7. Under Model Names, click Add Model and enter your preferred model IDs:
    • claude-sonnet-5.5 (Recommended for primary coding & composer)
    • claude-sonnet-5 (Next-gen frontier reasoning)
    • claude-opus-5 (Deep architectural refactoring)
    • gpt-5.6-luna (High-speed OpenAI completions)
    • deepseek-v4-pro (Cost-effective reasoning & logic)
  8. Disable default builtin models if you only want to route through Guts AI.

Verifying connection in terminal

You can verify that your Cursor configuration can reach Guts AI using raw cURL before starting your coding session:

1# Test connectivity to Guts AI OpenAI endpoint
2curl https://api.gutsai.id/v1/chat/completions \
3 -H "Authorization: Bearer $GUTS_API_KEY" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "model": "claude-sonnet-5.5",
7 "messages": [{"role": "user", "content": "Ping!"}]
8 }'
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.

Cline & Roo Code

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.
Base URL https://api.gutsai.id/v1 The standard unified Guts AI OpenAI endpoint.
API Key sk-guts-... Your secret API key from Developer Console.
Model ID claude-sonnet-5.5 Primary coding model. You can also specify claude-sonnet-5 or deepseek-v4-pro.

JSON configuration (settings.json)

Alternatively, you can configure Cline / Roo Code directly inside your VS Code settings.json:

1{
2 "cline.apiProvider": "openai-compatible",
3 "cline.openAiBaseUrl": "https://api.gutsai.id/v1",
4 "cline.openAiApiKey": "sk-guts-your-key-here",
5 "cline.openAiModelId": "claude-sonnet-5.5",
6 "cline.openAiCustomModelInfo": {
7 "maxTokens": 8192,
8 "contextWindow": 200000,
9 "supportsImages": true,
10 "supportsPromptCache": true
11 }
12}

Supported autonomous capabilities

  • Autonomous Multi-File Editing: Full support for diff application, file creation, and structural refactoring.
  • Terminal Tool Execution: Streamlined bash/zsh command execution with tool call feedback as it streams.
  • Balance holds: Each request reserves its cost when it opens, so long coding sessions are billed request by request against your balance.

Hermes Agent

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"
11
12# 4. Isolated Git Worktree Mode (for parallel agent execution)
13hermes -w my-feature-branch

Native agent workflows

  • Autonomous Multi-Tool Calling: Execute terminal commands, edit multiple files, and run test suites using the standard OpenAI tool-calling format.
  • Deep Reasoning & Extended Thinking: Full streaming of chain-of-thought tokens for architecture planning and deep debugging.
  • Parallel Subagent Delegation: Dispatch isolated subagents with dedicated workspaces via delegate_task.

Claude Code CLI

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:

1{
2 "env": {
3 "ANTHROPIC_BASE_URL": "https://api.gutsai.id",
4 "ANTHROPIC_AUTH_TOKEN": "sk-guts-your-api-key",
5 "ANTHROPIC_API_KEY": ""
6 },
7 "model": "claude-sonnet-5.5"
8}
1# Method 1: Export Environment Variables (Terminal Session)
2export ANTHROPIC_BASE_URL="https://api.gutsai.id"
3export ANTHROPIC_AUTH_TOKEN="sk-guts-your-api-key"
4
5# Method 2: Launch Interactive TUI
6claude
7
8# Method 3: Non-Interactive Print Mode (-p) for Automation & CI/CD
9claude -p "Refactor src/api/auth.go to use JWT tokens" --allowedTools "Read,Edit,Write,Bash" --max-turns 15
10
11# Method 4: PR Review in Isolated Git Worktree
12claude -w pr-review "Review all changes vs main branch for security vulnerabilities"

Supported execution modes

  • Interactive TUI Mode: Full conversational REPL with live tool execution tracking, slash commands (/compact, /review, /cost), and subagents.
  • Non-Interactive Print Mode (-p): Direct headless execution for scripts and CI/CD pipelines with structured JSON output.
  • Git Worktree Isolation (-w): Spawn parallel coding sessions in isolated branches without workspace pollution.

OpenCode

OpenCode is an open-source AI terminal pair programmer and coding agent. OpenCode connects to Guts AI as a custom OpenAI-compatible provider.

Custom provider:
Configure Guts AI as a custom provider to use the gateway's models in OpenCode's terminal interface and /models selector.

Configuration file (opencode.json)

Define Guts AI in ~/.config/opencode/opencode.json (global) or at your project root:

1// ~/.config/opencode/opencode.json or ./opencode.json
2{
3 "$schema": "https://opencode.ai/config.json",
4 "model": "guts/claude-sonnet-5.5",
5 "provider": {
6 "guts": {
7 "npm": "@ai-sdk/openai-compatible",
8 "name": "Guts AI Gateway",
9 "options": {
10 "baseURL": "https://api.gutsai.id/v1",
11 "apiKey": "{env:GUTS_API_KEY}"
12 },
13 "models": {
14 "claude-sonnet-5.5": { "name": "Claude Sonnet 5.5" },
15 "claude-opus-5": { "name": "Claude Opus 5" },
16 "gpt-5.6-luna": { "name": "GPT-5.6 Luna" },
17 "deepseek-v4-pro": { "name": "DeepSeek V4 Pro" },
18 "kimi-k3": { "name": "Kimi K3" }
19 }
20 }
21 }
22}
1# 1. Export API Key
2export GUTS_API_KEY="sk-guts-your-api-key"
3
4# 2. Interactive Terminal UI
5opencode
6
7# 3. Run Non-Interactive One-Shot Task
8opencode run "Add integration test suite for /v1/checkout endpoint"
9
10# 4. Attach Specific Context Files
11opencode run "Analyze schema migration" -f ./migrations/001_init.sql

Workflows & commands

  • Interactive Pair Programming: Code collaboratively inside the terminal with your project as context.
  • Headless Task Execution: Run opencode run "<task>" directly from scripts or git pre-commit hooks.
  • File Attachments: Pass specific context files with -f <path> for precise code reviews and refactors.

OpenClaw Worker

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:

1// ~/.openclaw/openclaw.json (or ~/.clawdbot/clawdbot.json)
2{
3 "models": {
4 "mode": "merge",
5 "providers": {
6 "guts": {
7 "baseUrl": "https://api.gutsai.id/v1",
8 "apiKey": "sk-guts-your-api-key",
9 "api": "openai-completions",
10 "models": [
11 {
12 "id": "claude-sonnet-5.5",
13 "name": "Claude Sonnet 5.5",
14 "contextWindow": 200000,
15 "maxTokens": 8192,
16 "reasoning": false,
17 "input": ["text", "image"]
18 },
19 {
20 "id": "deepseek-v4-pro",
21 "name": "DeepSeek V4 Pro",
22 "contextWindow": 128000,
23 "maxTokens": 8192,
24 "reasoning": true,
25 "input": ["text"]
26 }
27 ]
28 }
29 }
30 },
31 "agents": {
32 "defaults": {
33 "model": {
34 "primary": "guts/claude-sonnet-5.5",
35 "fallbacks": ["guts/deepseek-v4-pro"]
36 }
37 }
38 }
39}
1# 1. Run Autonomous OpenClaw Agent Task
2openclaw run --task "Scrape tech news and generate Markdown executive summary"
3
4# 2. Start Interactive Agent Session
5openclaw agent --model guts/claude-sonnet-5.5
6
7# 3. Verify Health & Provider Diagnostics
8openclaw doctor

Worker capabilities

  • Multimodal Visual Scraping: Process live browser snapshots and extract structured tables and JSON from web pages.
  • Autonomous Multi-Tier Fallbacks: Seamlessly switch between configured models if quotas or upstream provider limits spike.
  • Concurrent Streaming: Each agent's stream is relayed line by line as the provider sends it.

Pi CLI Assistant

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
2{
3 "defaultProvider": "openai",
4 "providers": {
5 "openai": {
6 "baseURL": "https://api.gutsai.id/v1",
7 "apiKey": "sk-guts-your-api-key"
8 }
9 },
10 "defaultModel": "claude-sonnet-5.5"
11}
1# 1. Install Pi Coding Agent globally via npm
2npm install -g @mariozechner/pi-coding-agent
3
4# 2. Export Standard Environment Variables
5export OPENAI_BASE_URL="https://api.gutsai.id/v1"
6export OPENAI_API_KEY="sk-guts-your-api-key"
7
8# 3. Launch Interactive Pi Coding Agent
9pi --model openai/claude-sonnet-5.5
10
11# 4. One-Shot Script Execution with Reasoning
12pi --model openai/deepseek-v4-pro -p "Implement lock-free queue in C++"

Context engineering & extensibility

  • Repository Context (AGENTS.md): Place project instructions in your repo root for automatic context loading on startup.
  • System Prompt Tuning (SYSTEM.md): Easily customize or append instructions to Pi's minimal system prompt.
  • Runs anywhere: Use Pi in a local terminal, a Docker container or a tmux session.

Changelog

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.

Learn more in the docs
Model

DeepSeek V4.1 Flash free until Dec 8

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.

deepseek-v4.1-flash-1017:free
Browse the model catalog
API

Management keys and the developer API

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.

GET /v1/keys
Learn more in the docs
API

OpenAI-style errors and Guts response IDs

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.

Learn more in the docs
Model

Claude Fable 5.1, Opus 4.8 and Opus 5

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.

claude-fable-5.1
View the model page
Console

Leaderboard in the console

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.

Open the console
Billing

Email receipts for balance conversions

Converting Telegram store balance to API credit now emails a receipt to the address on your account. Accounts without an email address get no receipt.

Learn more in the docs
API

Default rate limit raised to 60 RPM

New API keys allow 60 requests per minute, up from 50. Existing keys on the old default of 50 were raised to 60.

Learn more in the docs

November 2026

Model

GLM 5.4

glm-5.4 from Z.ai is live in the catalog, with reasoning, tool calling and a 1M-token context.

glm-5.4
View the model page
APIBreaking

/v1/responses removed

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.

Learn more in the docs