Layers
One API for Every AI Model

One Gateway,
All AI Models

Access 40 models from 6 providers through a single OpenAI-compatible API. Built-in auth, credits, rate limiting, and real-time analytics.

request.js
const response = await fetch('https://api.layers.dev/v1/chat', {
  headers: {
    'Authorization': 'Bearer lyr_live_...',
  },
  body: JSON.stringify({
    model: "anthropic/claude-sonnet-4.5", // Change anytime
  })
});
The Problem

Managing Multiple AI Providers Is Complex

  • Different SDKs for each provider (Anthropic, OpenAI, Google)
  • Separate API keys and authentication methods
  • Scattered billing across multiple services
  • No unified analytics or usage tracking
The Solution

One Gateway, All AI Models

  • Single OpenAI-compatible API for all providers
  • One API key for everything (lyr_live_*)
  • Unified credit system with transparent pricing
  • Complete usage analytics in one dashboard

Why Developers Choose Layers

Production-ready infrastructure that scales with your application

Switch Models in One Line

No vendor lock-in. Change from Claude to GPT-4o by updating a single parameter. Perfect for A/B testing and cost optimization.

Pay Only for What You Use

Transparent credit system with real-time tracking. No hidden fees, no minimum commitments. Start free with 50 credits.

Production-Ready from Day One

Built-in authentication, rate limiting, and error handling. Deploy with confidence knowing the infrastructure is battle-tested.

Complete Usage Visibility

Real-time analytics showing costs, tokens, and performance per model. Understand exactly where your budget goes.

OpenAI-Compatible API

Drop-in replacement for OpenAI SDK. Migrate existing applications by changing only the base URL and API key.

40 Models, 6 Providers

Access models from Anthropic, OpenAI, Google, Perplexity, and more. Always up-to-date with new releases.

Simple Pricing

Start free, scale as you grow

Free

$0/month

50 credits

  • 10 req/min
  • All models
Start Free

Starter

$20/month

500 credits

  • 60 req/min
  • Advanced analytics
Get Started
Most Popular

Pro

$100/month

3,000 credits

  • 300 req/min
  • Priority support
Get Started

Team

$200/month

7,500 credits

  • 1,000 req/min
  • 24/7 support + SLA
Get Started

Why Choose Layers?

Compare the traditional approach to the Layers advantage

FeatureDirect Provider APIsLayers
Multi-Provider AccessMultiple SDKs
Unified AuthenticationSeparate keys
Consolidated BillingMultiple invoices
Usage AnalyticsScattered dashboards
Rate LimitingManual implementation
Switch ModelsCode changes requiredOne parameter

Quick Start

Get up and running in less than 5 minutes

cURL Example

curl -X POST https://api.layers.dev/v1/chat \
  -H "Authorization: Bearer lyr_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4.5",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Ready to Simplify Your AI Stack?

Join developers who've consolidated their AI infrastructure with Layers. Start with 50 free credits today.