Welcome to Layers
Layers is an AI API Gateway that gives you unified access to 40 models from 6 providers (19 language models, 21 image models) through a single API key and credit balance.
Powered by Hustle Together AI SDK - Layers is built on top of the Hustle Together AI SDK, which provides the AI model registry (40 models from 6 providers), real-time pricing data, and routing infrastructure via Vercel AI Gateway. Layers adds credit management, authentication, rate limiting, and Stripe billing on top.
One API Key
Access Anthropic, OpenAI, Google, Perplexity, and Morph with a single key.
Unified Credits
One credit balance works across all providers. 1 credit = $0.01 USD.
OpenAI Compatible
Drop-in replacement for OpenAI SDK. Works with Vercel AI SDK.
Usage Analytics
Real-time tracking of tokens, costs, and credits in your dashboard.
Quick Start#
Make your first API call in seconds. For the complete setup guide, see Getting Started.
curl -X POST https://layers.hustletogether.com/api/v1/chat \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "anthropic/claude-sonnet-4.5",
"messages": [{"role": "user", "content": "Hello!"}]
}'Get your API key
How It Works#
Layers Gateway sits between your application and AI providers, automatically tracking usage, managing billing, and providing a unified interface.
Gateway
AI SDK
When you make a request through Layers, we authenticate you, check credits, then route to the Hustle Together AI SDK which handles model lookup and provider routing via Vercel AI Gateway.
Supported Providers#
| Provider | Models | Capabilities |
|---|---|---|
| Anthropic | Claude 4.5 (Haiku, Sonnet, Opus) | Text, Vision, Tools, Extended Thinking |
| OpenAI | GPT-4o, GPT-4o Mini, GPT-5 (Chat, Codex, Thinking, Nano, Pro), GPT-5.1 variants | Text, Vision, Tools, JSON Mode, Image Gen (GPT-5 series) |
| Gemini 2.5 (Flash, Flash Lite, Flash Image, Pro), Gemini 3 (Flash, Pro Preview, Pro Image), Imagen 4.0 (Fast, Standard, Ultra) | Text, Vision, Multimodal, Image Gen | |
| Perplexity | Sonar, Sonar Pro, Sonar Reasoning Pro | Web Search, Citations, Reasoning |
| Morph | V3 Fast, V3 Large | Fast text generation |
| BFL (Black Forest Labs) | Flux 2 (Pro, Flex, Max, Klein 4B), Flux Kontext (Pro, Max), Flux Pro 1.1 (Standard, Ultra), Flux Pro 1.0 Fill | Image generation, Inpainting |
| Recraft | Recraft V3, Recraft V2 | Image generation |
Subscription Tiers#
| Tier | Price | Credits | Rate Limit |
|---|---|---|---|
| Free | $0 | 50/month | 10 req/min |
| Starter | $20/mo | 500/month | 60 req/min |
| Pro | $100/mo | 3,000/month | 300 req/min |
| Team | $200/mo | 7,500/month | 1,000 req/min |
Guides#
Getting Started
Quick setup in under 5 minutes
Authentication
User auth (OAuth) and API key authentication
Gateway Architecture
How Layers works under the hood
Billing & Credits
Credit system, margins, and Stripe
Security Guide
Security concerns, hardening, and best practices
For Mirror Factory / Hustle Together AI#
Layers is designed as the AI Gateway layer for the Hustle Together platform. When the Layers toggle is ON in your application, all AI requests route through Layers for automatic tracking and billing.