Documentation

AIGet, from the first request.

AIGet is an OpenAI-compatible gateway. One key, one endpoint at api.aiget.tech/v1 and one prepaid balance in USD. This page covers the basics; the complete reference lives on aiget.tech.

Highlight
OpenAI-compatible
Highlight
Base URL · api.aiget.tech/v1
Highlight
Full reference at aiget.tech

Overview

AIGet accepts an OpenAI Chat Completions request and routes it to a model from one of the connected providers. It handles authentication, balance checks, provider failover, usage metering and token-based billing. Your application sees one endpoint and one request/response shape.

Full reference. This page is a short guide. Error codes, every endpoint, reasoning controls and model-specific details are documented at aiget.tech/en/docs.
  • Base URL — https://api.aiget.tech/v1
  • Auth — Authorization: Bearer $AIGET_KEY
  • Balance — prepaid USD, charged per token used
  • Models — list them with GET /v1/models

Quickstart

Create an API key in the AIGet dashboard, then point your client at the base URL. If you already use an OpenAI-compatible SDK, the code usually works after changing the base URL and key.

quickstart.sh
shell
curl https://api.aiget.tech/v1/chat/completions \  -H "Authorization: Bearer $AIGET_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "aiget/auto",    "messages": [      { "role": "user", "content": "Summarise this report" }    ],    "stream": true  }'

With the OpenAI SDK

index.ts
ts
import OpenAI from "openai"; const client = new OpenAI({  baseURL: "https://api.aiget.tech/v1",  apiKey: process.env.AIGET_KEY,}); const completion = await client.chat.completions.create({  model: "aiget/auto",  messages: [{ role: "user", content: "Summarise this report" }],});

Endpoints

  • GET /v1/models — every active model, with capabilities and pricing metadata.
  • POST /v1/chat/completions — text, images, tools and streaming.
  • POST /v1/audio/speech — text to speech with an audio model; returns a binary audio file.

There are no AIGet-specific fields you must add. Send a standard OpenAI payload with a model id from the catalog.

models.sh
shell
# List every active modelcurl https://api.aiget.tech/v1/models \  -H "Authorization: Bearer $AIGET_KEY" # Pin a model, or let the router choose# "model": "aiget/auto"

Models & routing

Send a specific model id to pin it, or send aiget/auto to let the router choose. Per-request routing can be steered with the X-AIGet-Policy header: cost, quality, latency or balanced.

routing.sh
shell
curl https://api.aiget.tech/v1/chat/completions \  -H "Authorization: Bearer $AIGET_KEY" \  -H "Content-Type: application/json" \  -H "X-AIGet-Policy: latency" \  -d '{    "model": "aiget/auto",    "messages": [{ "role": "user", "content": "Hello" }]  }'

The response reports which model and provider actually answered in X-AIGet-Model and X-AIGet-Provider. Rate limits and 5xx responses from a provider are retried automatically before anything is sent to your application.

Streaming, tools and vision

  • Set stream: true for server-sent events. Chunks are forwarded as the provider sends them.
  • Tool calling uses the standard tools and tool_choice fields.
  • Image input uses standard image_url content parts.
  • Reasoning models can be steered per request with chat_template_kwargs, using the key documented for that model family.

Models that do not support a capability are filtered out before the request is sent, so an incompatible request returns no_model_available rather than a provider error.

Errors and rate limits

Requests are limited per API key at 60 per minute by default. The limit and remaining count are returned in X-RateLimit-Limit and X-RateLimit-Remaining. A 429 response includes Retry-After in seconds.

Error bodies are objects with an error key containing message, type and code. Common codes include:

  • missing_api_key / invalid_api_key — 401
  • insufficient_balance — 402, balance below the minimum for a paid model
  • key_limit_exceeded / project_cap_exceeded — 402, spending cap reached
  • no_model_available — 400, unknown model or no model matches the filters
  • all_providers_failed — 502, every candidate provider failed

Balance and top-ups

AIGet uses a prepaid balance held in USD. Each request is charged at the model's published per-token price. Balance does not expire, and top-ups are paid in IDR through Midtrans with the exchange rate locked at checkout.

  • Paid models return insufficient_balance when the balance is too low.
  • Free models keep working at zero balance.
  • Spending caps can be set per API key and per project.
  • Every balance change is recorded with a reason and reference.

Need help with a request? Use AIGet support or contact Seneco.