API Documentation

GiveMeSomeTokens provides an OpenAI-compatible API proxy that routes requests to 14 AI providers using your wallet balances. Use any OpenAI SDK — just swap the base URL and use your GMT key.

Quick Start

Get started in 3 steps: connect a provider key, generate a GMT key, and start making API calls.

  1. 1.Sign up at givemesometokens.dev/login and connect your AI provider key under Dashboard → API Keys.
  2. 2.Generate a GMT key under Dashboard → Integrations. It starts with gmt_.
  3. 3.Make API calls using your GMT key:
curl https://givemesometokens.dev/api/v1/chat/completions \
  -H "Authorization: Bearer gmt_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Or use the OpenAI Python SDK:

from openai import OpenAI

client = OpenAI(
    api_key="gmt_your_key_here",
    base_url="https://givemesometokens.dev/api/v1"
)

response = client.chat.completions.create(
    model="claude-sonnet-4-6",   # or gpt-4o, gemini-2.5-pro, etc.
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Authentication

All API requests require a GMT key passed as a Bearer token in the Authorization header.

Authorization: Bearer gmt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Security: Your GMT key routes through your stored API keys — it never exposes the underlying provider keys. Treat your GMT key like a password.

Chat Completions

POST
/api/v1/chat/completions

Create a chat completion (OpenAI-compatible)

Full OpenAI-compatible endpoint. Supports streaming.

Request body

{
  "model": "claude-sonnet-4-6",        // Required: model name
  "messages": [                         // Required: conversation history
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ],
  "stream": false,                      // Optional: enable SSE streaming
  "max_tokens": 1024,                   // Optional
  "temperature": 0.7,                   // Optional (0-2)
  "top_p": 1.0                          // Optional
}

Response

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1718000000,
  "model": "claude-sonnet-4-6",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Hello! How can I help you today?"
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 12,
    "total_tokens": 27
  }
}

Streaming example

stream = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Write a poem"}],
    stream=True
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Models

GET
/api/v1/models

List all available models

curl https://givemesometokens.dev/api/v1/models \
  -H "Authorization: Bearer gmt_your_key_here"

Models are routed by prefix:

Model prefixProviderExamples
claude-*Anthropicclaude-sonnet-4-6, claude-opus-4-7
gpt-*, o1-*, o4-*OpenAIgpt-4o, gpt-4o-mini, o4-mini
gemini-*Googlegemini-2.5-pro, gemini-2.5-flash
llama-*, mixtral-*, gemma*Groqllama-3.3-70b-versatile
grok-*xAIgrok-3, grok-3-mini
mistral-*, codestral-*Mistral AImistral-large-latest
deepseek-*DeepSeekdeepseek-chat, deepseek-reasoner
command-*Coherecommand-r-plus, command-r
sonar-*, llama-*-onlinePerplexitysonar-pro
meta-llama/* (together)Together AImeta-llama/Llama-3.3-70B-Instruct-Turbo
accounts/fireworks/*Fireworks AIaccounts/fireworks/models/llama-v3p1-70b-instruct
llama3.*bCerebrasllama3.3-70b, llama3.1-8b
jamba-*AI21 Labsjamba-1.5-large
Everything elseOpenRouterAny 200+ OpenRouter model

Providers

14 providers supported. Connect your keys at Dashboard → API Keys.

Claude (Anthropic)
GPT (OpenAI)
Gemini (Google)
OpenRouter
Groq
Grok (xAI)
Mistral AI
DeepSeek
Cohere
Perplexity AI
Together AI
Fireworks AI
Cerebras
AI21 Labs

See all providers for supported models and API details.

Wallet API

GET
/api/wallet

Get your wallet balances across all providers

curl https://givemesometokens.dev/api/wallet \
  -H "Authorization: Bearer gmt_your_key_here"
{
  "claudeBalance": 50.0,
  "openaiBalance": 100.0,
  "geminiBalance": 25.0,
  "groqBalance": 75.0
  // ... all 14 providers
}

Support API

Send token support to a creator programmatically.

POST
/api/support

Send tokens to a creator

{
  "creatorId": "clxxxxxxxxxxxx",
  "provider": "claude",
  "amount": 10.0,
  "message": "Keep up the great work!",
  "isAnonymous": false,
  "isPublic": true
}
GET
/api/users/:username

Get a creator's public profile and wallet address

curl https://givemesometokens.dev/api/users/alice
{
  "id": "clxxxxxxxxxxxx",
  "username": "alice",
  "name": "Alice",
  "bio": "AI developer",
  "isCreator": true,
  "creatorTier": "Gold"
}

GMT Connect OAuth

Allow your app to authenticate users via GiveMeSomeTokens and access their token balances. Requires a Pro plan. Register an OAuth app →

OAuth flow

  1. 1. Redirect user to the authorization endpoint
  2. 2. User approves access on GMT
  3. 3. GMT redirects back with ?code=...
  4. 4. Exchange code for access token
  5. 5. Use token to call GMT APIs on behalf of the user
GET
/api/oauth/authorize

Redirect user here to begin OAuth flow

https://givemesometokens.dev/api/oauth/authorize
  ?client_id=your_client_id
  &redirect_uri=https://yourapp.com/callback
  &response_type=code
  &scope=read_balance use_provider
  &state=random_state_string
  &code_challenge=sha256_of_verifier   // PKCE required
  &code_challenge_method=S256
POST
/api/oauth/token

Exchange authorization code for access token

{
  "grant_type": "authorization_code",
  "code": "auth_code_from_redirect",
  "redirect_uri": "https://yourapp.com/callback",
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "code_verifier": "your_pkce_verifier"
}
GET
/api/oauth/userinfo

Get authenticated user info (requires token)

Available scopes

read_profileRead user's public profile info
read_balanceRead token wallet balances
use_providerRoute API calls through user's wallet
paymentSend token support on behalf of user
subscriptionManage recurring token subscriptions

Error Codes

HTTP StatusErrorCause
401UnauthorizedMissing or invalid GMT key
400Missing modelNo model specified in request
400No provider keyProvider key not connected in your wallet
400Insufficient balanceWallet balance too low for this request
404Item not foundRequested resource does not exist
429Rate limitedToo many requests — slow down
500Provider errorUpstream AI provider returned an error

All errors return JSON: { "error": "message" }

SDKs & Tools

Since GMT is OpenAI-compatible, any existing OpenAI SDK works out of the box.

Python (openai)
from openai import OpenAI
client = OpenAI(
  api_key="gmt_...",
  base_url="https://givemesometokens.dev/api/v1"
)
Node.js (openai)
import OpenAI from "openai";
const client = new OpenAI({
  apiKey: "gmt_...",
  baseURL: "https://givemesometokens.dev/api/v1"
});
Cursor / Cline / Continue
# Set in tool settings:
API Base URL: https://givemesometokens.dev/api/v1
API Key: gmt_your_key_here
curl
curl https://givemesometokens.dev/api/v1/chat/completions \
  -H "Authorization: Bearer gmt_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[...]}'

Integration guides

See Integrations in the dashboard for step-by-step setup for Cursor, Cline, Continue, Roo Code, Aider, and more.