gair Connection Guide — Using gair from Your Development Tool
gair is an AI API router operated by GIIP. It exposes an endpoint compatible with the Anthropic Messages format, so most development tools that accept a base URL and a key can be pointed at it directly.
📋 Overview
gair is an AI API router compatible with the Anthropic Messages format. When you send a request, gair classifies its content and splits it into a profile (simple query / code work / careful judgement), then forwards it to the model configured for that profile. You simply work in the tool you already use — model selection is handled by gair.
Usage is recorded per project and can be reviewed per project in the GIIP console.
🔐 Before You Start — Project and SK
gair is not a public API that anyone can use straight away. Two things must be in place first:
- A GIIP project — the project you are going to use.
- A project SK — a Secret Key issued for that project, and gair access must be enabled for that project.
The GIIP operator (giip Inc.) opens projects and issues SKs. If you do not have them yet, ask the operator for a project and an SK.
Handling the SK
- An SK is as sensitive as a password. Do not share it or write it into code repositories, documents or chat.
- A single SK is the whole authentication scheme — there is no additional key.
- When several people use it, do not share one SK around. Issue a separate project and SK per person: that keeps usage split per person (per project) and lets you switch access off for just that project if something goes wrong.
📃 Reading the Model List
Some development tools read a model list first when they save a key and a base URL (the Anthropic-style GET /v1/models). gair provides that path as well.
| Path | Response |
|---|---|
GET /api/gair/v1/models | The list of model aliases gair accepts |
GET /api/gair/v1/models/{id} | A single model (404 for an unknown id) |
Every id in the list is a model alias gair accepts. If you put in an id that is not on the list, gair cannot resolve an upstream and the request fails.
Note that if the upstream key for an alias is not configured (for example a MiniMax alias with no MiniMax key), the request fails with a 503 at request time. Appearing on the list and succeeding in a request are separate things — key configuration is managed by the operator.
This lookup needs authentication and does not record usage — it is a lookup, not a billable request. Authentication is the same as for message requests (a single project SK), so the same SK is used to read the list.
🚀 Quick Start 1 — Claude Code
Claude Code is a combination whose connection has actually been verified. Two environment variables are all it takes.
| Environment variable | Value |
|---|---|
ANTHROPIC_BASE_URL | https://giipfaw.azurewebsites.net/api/gair |
ANTHROPIC_AUTH_TOKEN | <the SK you were issued> |
macOS / Linux (bash, zsh):
export ANTHROPIC_BASE_URL="https://giipfaw.azurewebsites.net/api/gair"
export ANTHROPIC_AUTH_TOKEN="<the SK you were issued>"
claude
Windows (PowerShell):
$env:ANTHROPIC_BASE_URL = "https://giipfaw.azurewebsites.net/api/gair"
$env:ANTHROPIC_AUTH_TOKEN = "<the SK you were issued>"
After that, run Claude Code as usual and get to work. The tool appends the detailed path itself, so enter the address exactly as shown above — do not add /v1 or any other suffix yourself.
🚀 Quick Start 2 — VS Code + Cline
Cline, the VS Code extension, connects with the same address and SK.
- Install the Cline extension first: Cline — Visual Studio Marketplace
- In the Cline settings choose Anthropic as the API Provider.
- Put
<the SK you were issued>in the Anthropic API Key field. - Tick Use custom base URL and enter
https://giipfaw.azurewebsites.net/api/gair. - Saving makes Cline refresh its model list. It reads the gair model list path (
GET /api/gair/v1/models), so the list fills in correctly. Pick any model from the Model list — gair decides the actual response model from the request content, so the name you pick here and the model that actually answers may differ. - Start a new task.
Cline 4.1.27 reads the model list at the moment it saves the key. If that lookup fails (404 and the like) the list appears empty and the connection may not work at all. If the list is empty, check the troubleshooting table below.
🔧 Other Tools
These tools also accept a base URL directly, so the same address and SK work.
- OpenCode — set the base URL in the provider entry of its configuration file
- Continue — set
provider: anthropicand the API base (apiBase) on the model entry - Roo Code — same approach as Cline (Anthropic provider + custom base URL)
- VS Code Copilot BYOK — choose the Messages protocol on the custom endpoint in Language Models settings
The way each tool sends the key (the auth header) differs slightly, so for the tools above always confirm that the first call comes back normally after connecting. Claude Code is the combination whose connection has actually been verified; the other tools in this section are described on the premise that a setup path exists but each tool still needs its own check.
Antigravity cannot be connected. Antigravity has no BYOK / BYO-endpoint support for an external key or base URL, so there is no way to point it at gair.
🛠️ Troubleshooting
| Symptom | What to check |
|---|---|
| Authentication error (401) | Check that the SK was entered exactly. A missing or wrong SK cannot pass authentication. Check whether it was newly issued and whether stray spaces crept in. |
| Access denied (403) | gair access is not enabled for that project. Ask the operator to enable gair access for it. |
| Address error (404 and the like) | Check that the base URL is exactly https://giipfaw.azurewebsites.net/api/gair. Adding or removing a path suffix changes the final URL the tool builds and the call fails. A 404 comes back as an Anthropic-style error ({"type":"error","error":{"type":"not_found_error","message":"Not Found"}}) and the requested path is recorded on the server, so include the path when you report an error to the operator. |
| The model list is empty | The model list lookup (GET /api/gair/v1/models) uses the same authentication as message requests. For a 401/403, recheck the SK and access items above. For a 404, check that the address stops at .../api/gair with no /v1 suffix. |
| It connects somewhere else after setup | A terminal or tool that was already open may still hold the old setting. Start the tool again from the terminal where you set the environment variables. |
If none of these resolve it, write down the tool you are using and the error message and contact the operator. Do not include the SK value itself in the request.
📎 Reference — Connection Summary
| Item | Value |
|---|---|
| Base URL | https://giipfaw.azurewebsites.net/api/gair |
| Authentication | One project SK (entered as ANTHROPIC_AUTH_TOKEN and the like) |
| Model selection | Not needed — gair classifies the request and routes it |
| Model list | GET /api/gair/v1/models · GET /api/gair/v1/models/{id} (used when a tool reads the list) |
| Usage review | Per project in the GIIP console (model list lookups are not recorded) |