Quick Start Guide

AI API Gateway
Quick Start

Get your AI gateway running in under 5 minutes. Follow our simple step-by-step guide to configure, deploy, and make your first API call with minimal effort and maximum speed.

5 minutes
to running

Setup Steps

Follow these 4 simple steps to get started

1

Install the Gateway

Install the AI API gateway using your preferred package manager. The gateway is available for npm, pip, and Docker, making it easy to integrate into any development environment.

# Using npm npm install -g ai-api-gateway # Using pip pip install ai-api-gateway # Using Docker docker pull ai-api-gateway/latest
2

Configure API Keys

Set up your AI provider API keys in the configuration file. The gateway supports multiple providers including OpenAI, Anthropic, Google AI, and more. You can add keys for multiple providers and the gateway will handle routing automatically.

# Create config file ai-gateway init # Edit ~/.ai-gateway/config.yaml providers: openai: api_key: "sk-your-openai-key" anthropic: api_key: "sk-ant-your-anthropic-key" gateway: port: 3000 default_provider: "openai"
3

Start the Gateway

Launch the gateway with a single command. The gateway will start on your configured port and begin accepting requests immediately. You'll see a confirmation message when the gateway is ready to handle traffic.

# Start the gateway ai-gateway start # Output ✓ Gateway started on port 3000 ✓ OpenAI provider configured ✓ Anthropic provider configured ✓ Ready to accept requests
4

Make Your First Request

Test your gateway with a simple API call. The gateway exposes a unified OpenAI-compatible interface, so you can use standard OpenAI SDKs or make direct HTTP requests. Your request will be routed to the appropriate AI provider automatically.

First API Request cURL
curl -X POST http://localhost:3000/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-gateway-key" \ -d '{ "model": "gpt-4-turbo", "messages": [ {"role": "user", "content": "Hello, AI!"} ] }' # Response { "id": "chatcmpl-abc123", "object": "chat.completion", "model": "gpt-4-turbo", "choices": [{ "message": { "role": "assistant", "content": "Hello! How can I help you today?" } }] }

Pro Tips

Quick tips to get the most out of your gateway setup

🔑

Secure Your Keys

Never commit API keys to version control. Use environment variables or secure secret management systems to store sensitive credentials.

📊

Monitor Usage

Enable the built-in analytics dashboard to track API usage, costs, and performance metrics from day one.

🔄

Use Fallbacks

Configure model fallbacks to automatically switch to alternative models if your primary choice is unavailable or rate-limited.

Next Steps

Continue your journey with these resources