AgnicPay

AI Gateway

Access 340+ AI models through a single, OpenAI-compatible API

AI Gateway

AgnicPay's AI Gateway provides access to 340+ AI models from leading providers through a single, OpenAI-compatible API. Pay-per-use with your AgnicPay balance.

What is the AI Gateway?

The AI Gateway is a unified API that gives you access to models from:

  • OpenAI - GPT-4o, GPT-4 Turbo, o1
  • Anthropic - Claude 3.5 Sonnet, Claude 3 Opus
  • Google - Gemini Pro, Gemini 1.5 Pro, Gemini 2.0 Flash
  • Meta - Llama 3.3 70B, Llama 3.1 405B
  • Plus 300+ more from Mistral, DeepSeek, Qwen, and others

Key Features

How It Works

graph LR
    A[Your App] --> B[AgnicPay AI Gateway]
    B --> C[OpenAI]
    B --> D[Anthropic]
    B --> E[Google]
    B --> F[Meta/Llama]
    B --> G[300+ Others]
  1. Send requests to https://api.agnic.ai/v1
  2. Use your AgnicPay token for authentication
  3. Choose any model from 340+ available options
  4. Pay per request - costs deducted from your USDC balance

Quick Example

from openai import OpenAI
 
client = OpenAI(
    api_key="agnic_tok_YOUR_TOKEN",
    base_url="https://api.agnic.ai/v1"
)
 
response = client.chat.completions.create(
    model="openai/gpt-4o",  # or anthropic/claude-3.5-sonnet, etc.
    messages=[{"role": "user", "content": "Hello!"}]
)
 
print(response.choices[0].message.content)

Base URL

All AI Gateway endpoints use:

https://api.agnic.ai/v1

Authentication

Use either authentication method:

MethodHeaderToken Format
API TokenAuthorization: Bearer {token}agnic_tok_...
OAuth2Authorization: Bearer {token}agnic_at_...
AlternativeX-Agnic-Token: {token}agnic_tok_...

Pricing

Costs vary by model and are charged per token. We offer many free models including Llama, Gemma, and Mistral for development and testing.

View the complete list of 340+ models with live pricing at AI Gateway Pricing.

Spending Limits

Control your costs with built-in spending limits:

  • Per-transaction limit - Maximum cost per API call
  • Daily limit - Total spend allowed per day
  • Monthly limit - Total spend allowed per month

Configure limits when creating your API token or during OAuth authorization.

Next Steps

On this page