Admin Login

API Gateway

A powerful API gateway with built-in billing, usage tracking, and Stripe integration. Route requests, track costs, and manage your API ecosystem with ease.

Key Features

Smart Routing

Route API requests to multiple backends with CSV-based configuration and wildcard support.

Built-in Billing

Automatic cost calculation based on request duration with Stripe payment integration.

Usage Analytics

Comprehensive logging and analytics for all API requests and billing data.

Getting Started

Python API Client Example

Here's how to use the API Gateway with Python:

import requests

# Configuration
BASE_URL = "http://localhost:5000"
API_KEY = "your-api-key-here"

# Make an API request
headers = {
    "X-API-Key": API_KEY,
    "Content-Type": "application/json"
}

response = requests.get(
    f"{BASE_URL}/api/example",
    headers=headers,
    params={"param1": "value1"}
)

print(f"Status: {response.status_code}")
print(f"Response: {response.json()}")
Note: Replace your-api-key-here with your actual API key. Contact an administrator to get your API key.
Using the Python Client Library

For more advanced usage, use the provided Python client:

from api_client import APIGatewayClient

# Initialize client
client = APIGatewayClient(
    base_url="http://localhost:5000",
    api_key="your-api-key-here"
)

# Make requests
response = client.make_api_request(
    method="GET",
    path="example",
    params={"param1": "value1"}
)

print(f"Status: {response.status_code}")
print(f"Response: {response.text}")

API Endpoints

Route requests to configured backends with automatic billing and usage tracking.

Method Endpoint Description
GET, POST, PUT, DELETE /api/{path} Forward request to configured backend
Authentication: Requires X-API-Key header