Access powerful AI models through a simple, unified API. Start building with GPT-4, Claude, Gemini, and more.
Create an account and generate an API key from Settings → API Keys. Keep it safe—you'll only see it once!
Use the API key as a Bearer token or X-API-Key header. All endpoints use api.aitaana.com/api/v1.
Send messages to any available model. Responses include token usage and credits consumed.
Monitor your credit balance and usage through the dashboard or via the /user endpoint.
Get started in seconds with these code snippets.
Authorization: Bearer aiaas_xxxxxxxxxxxx
X-API-Key: aiaas_xxxxxxxxxxxx
# Send a chat message curl -X POST "https://api.aitaana.com/api/v1/chat/completions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "message": "Explain quantum computing in simple terms", "model": "gpt-4" }' # Get your profile curl "https://api.aitaana.com/api/v1/user" \ -H "X-API-Key: YOUR_API_KEY" # List conversations curl "https://api.aitaana.com/api/v1/conversations" \ -H "Authorization: Bearer YOUR_API_KEY"
// Using fetch (Node.js/Browser) const response = await fetch('https://api.aitaana.com/api/v1/chat/completions', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ message: 'Explain quantum computing in simple terms', model: 'gpt-4', }), }); const data = await response.json(); console.log(data.content); console.log(`Credits used: ${data.creditsUsed}`); // Using axios import axios from 'axios'; const api = axios.create({ baseURL: 'https://api.aitaana.com/api/v1', headers: { 'X-API-Key': API_KEY }, }); const { data } = await api.post('/chat/completions', { message: 'Hello!', model: 'claude-3-sonnet', });
import requests API_KEY = "aiaas_xxxxxxxxxxxx" BASE_URL = "https://api.aitaana.com/api/v1" headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json", } # Send a chat message response = requests.post( f"{BASE_URL}/chat/completions", headers=headers, json={ "message": "Explain quantum computing in simple terms", "model": "gpt-4", }, ) data = response.json() print(data["content"]) print(f"Credits used: {data['creditsUsed']}") # Get user profile profile = requests.get( f"{BASE_URL}/user", headers=headers, ).json() print(f"Balance: {profile['creditBalance']} credits")
<?php $apiKey = 'aiaas_xxxxxxxxxxxx'; $baseUrl = 'https://api.aitaana.com/api/v1'; // Send a chat message $ch = curl_init("{$baseUrl}/chat/completions"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer {$apiKey}", 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => json_encode([ 'message' => 'Explain quantum computing in simple terms', 'model' => 'gpt-4', ]), ]); $response = curl_exec($ch); $data = json_decode($response, true); echo $data['content']; echo "Credits used: " . $data['creditsUsed']; curl_close($ch); ?>
Interactive documentation. Click "Authorize" to add your API key and try endpoints live.