Documentation

Everything you need to integrate and use CostWise

Quick Start

1. Get Your API Key

Sign up for a free account and generate your first API key from the dashboard.

2. Make Your First Request

Use your API key to route requests through CostWise:

curl -X POST https://api.costwise.com/v1/route \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

3. View Your Costs

Track all your API usage and costs in real-time from your dashboard.

Features

Smart Routing

Automatically route requests to the most cost-effective model based on your requirements.

Cost Tracking

Real-time cost tracking with detailed breakdowns by model, user, and project.

Budget Alerts

Set spending limits and receive instant alerts when thresholds are reached.

ROI Analysis

Understand the cost-effectiveness of different AI models for your use cases.

API Reference

Base URL

https://api.costwise.com/v1

Authentication

All API requests require your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Endpoints

POST /route

Route an AI request through CostWise gateway

GET /costs

Get your cost summary and usage statistics

GET /models

List all available models and their pricing

FAQ

How does smart routing work?

CostWise analyzes your request requirements and automatically routes it to the most cost-effective model that can handle your task, while maintaining quality standards you define.

What models are supported?

We support all major AI providers including OpenAI (GPT-4, GPT-3.5), Anthropic (Claude), Google (Gemini), DeepSeek, and many more. Check our pricing page for the full list.

How is pricing calculated?

You're only charged for successful API calls. Pricing is based on the model used and the number of tokens processed (input + output). No hidden fees.

Can I set spending limits?

Yes! You can set monthly budgets or per-request limits. You'll receive alerts when you approach these thresholds and service can be paused if limits are reached.

Need Help?

Our team typically responds within 3 business days

Contact Support