Developer docs

Quickstart for API access

The documentation structure is ready for SEO and developer experience: clean URLs, clear headings, code samples, and expandable FAQ.

Request sample
const response = await fetch("http://localhost:3001/api/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: "Bearer gc_live_xxx",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "claude-default",
    messages: [
      { role: "user", content: "Write a short plan" }
    ],
    max_tokens: 128
  })
});

const result = await response.json();

Connect to Claude through the Gateway

Create a GoConnect key in the user panel and send requests to the Gateway. The Gateway meters usage, checks credit, and forwards the request to Claude through LiteLLM.

Main endpoint

  • POST /api/v1/chat/completionshttp://localhost:3001/api/v1/chat/completions
  • POST /api/v1/messageshttp://localhost:3001/api/v1/messages
  • GET /api/v1/modelshttp://localhost:3001/api/v1/models

Use localhost in local development. For Claude Code in production, use https://console.claudestore.ir/api as the base URL.

Use claude-opus for Claude Opus, claude-fable for Claude Fable 5, and claude-default for the default Claude model. The current upstream accepts Fable, but may report Sonnet in the response.

curl example
curl http://localhost:3001/api/v1/chat/completions \
  -H "Authorization: Bearer gc_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-default",
    "messages": [
      {
        "role": "user",
        "content": "Say hello in Persian in one sentence."
      }
    ],
    "max_tokens": 128
  }'

Claude Code setup

Use localhost in local development. For Claude Code in production, use https://console.claudestore.ir/api as the base URL.

Use claude-opus for Claude Opus, claude-fable for Claude Fable 5, and claude-default for the default Claude model. The current upstream accepts Fable, but may report Sonnet in the response.

Claude Code
export ANTHROPIC_BASE_URL="https://console.claudestore.ir/api"
export ANTHROPIC_API_KEY="gc_live_xxx"
export ANTHROPIC_AUTH_TOKEN="gc_live_xxx"
export ANTHROPIC_MODEL="claude-opus"
export ANTHROPIC_SMALL_FAST_MODEL="claude-default"

Where does the real Anthropic token go?

The Anthropic token, or upstream proxy key, belongs only on the server in the Gateway/LiteLLM environment. It must not be stored in the frontend, browser, user request, or GoConnect API key.

  • The user creates a gc_live or gc_test API key in GoConnect.
  • The user's application calls /api/v1/chat/completions, or Claude Code calls /api/v1/messages.
  • The Gateway hashes and validates the key, then checks credit and limits.
  • The Gateway connects to LiteLLM with LITELLM_MASTER_KEY.
  • LiteLLM calls Claude with ANTHROPIC_API_KEY.
  • Token usage is recorded and the user's wallet is charged.
.env + LiteLLM
# .env
LITELLM_BASE_URL=http://localhost:4000
LITELLM_MASTER_KEY=local-litellm-master-key
ANTHROPIC_API_KEY=sk-ant-or-upstream-provider-key
ANTHROPIC_API_BASE=https://api.anthropic.com
ANTHROPIC_CUSTOM_HEADERS=
ANTHROPIC_MESSAGES_DIRECT=false

# infra/litellm/config.example.yaml
model_list:
  - model_name: claude-default
    litellm_params:
      model: anthropic/claude-sonnet-4-5
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: os.environ/ANTHROPIC_API_BASE
  - model_name: claude-opus
    litellm_params:
      model: anthropic/nghi/claude-opus-4.8
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: os.environ/ANTHROPIC_API_BASE
  - model_name: claude-fable
    litellm_params:
      model: anthropic/nghi/claude-fable-5
      api_key: os.environ/ANTHROPIC_API_KEY
      api_base: os.environ/ANTHROPIC_API_BASE

Early FAQ

Quickstart guide, API key authentication, and request examples for connecting to AI model endpoints.

Are prices fixed?

Admins can update pricing per model.

Can API keys be limited?

Yes, every key can have limits and allowed models.

Is English fully supported?

Yes, /fa and /en routes are separate and indexable.