Get up and running with AltrumAI AI Gateway in minutes.
curl -X GET https://gateway.altrum.ai/
{ "message": "Welcome to the AltrumAI Gateway API! Documentation is available at https://docs.altrum.ai/ai-gateway" }
curl -X POST https://gateway.altrum.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-openai-api-key" \ -H "x-provider-name: openai" \ -H "x-altrumai-key: your-ai-system-api-key-from-altrumai" \ -d '{ "model": "gpt-4o-mini", "messages": [ { "role": "user", "content": "Hello! Can you tell me a joke?" } ], "max_tokens": 100 }'
{ "id": "chatcmpl-123", "object": "chat.completion", "created": 1677652288, "model": "gpt-4o-mini", "provider": "openai", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Why don't scientists trust atoms? Because they make up everything! 😄" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 9, "completion_tokens": 15, "total_tokens": 24 } }
curl -X POST https://gateway.altrum.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "x-provider-name: anthropic" \ -H "x-api-key: your-anthropic-api-key" \ -H "x-altrumai-key: your-ai-system-api-key-from-altrumai" \ -d '{ "model": "claude-3-5-haiku-20241022", "messages": [ { "role": "user", "content": "What is 2 + 2?" } ], "max_tokens": 50 }'
curl -X POST https://gateway.altrum.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "x-provider-name: google" \ -H "x-goog-api-key: your-google-api-key" \ -H "x-altrumai-key: your-ai-system-api-key-from-altrumai" \ -d '{ "model": "gemini-1.5-flash", "messages": [ { "role": "user", "content": "Explain quantum computing in one sentence." } ], "max_tokens": 100 }'
# Test with GPT-4o curl -X POST https://gateway.altrum.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer your-openai-api-key" \ -H "x-provider-name: openai" \ -H "x-altrumai-key: your-ai-system-api-key-from-altrumai" \ -d '{ "model": "gpt-4o", "messages": [ { "role": "user", "content": "Solve this math problem: 15 * 23 + 7" } ], "max_tokens": 50 }' # Test with Claude Sonnet curl -X POST https://gateway.altrum.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "x-provider-name: anthropic" \ -H "x-api-key: your-anthropic-api-key" \ -H "x-altrumai-key: your-ai-system-api-key-from-altrumai" \ -d '{ "model": "claude-3-5-sonnet-20241022", "messages": [ { "role": "user", "content": "Solve this math problem: 15 * 23 + 7" } ], "max_tokens": 50 }'
# Check if gateway is accessible curl -v https://gateway.altrum.ai/ # Check for network connectivity ping gateway.altrum.ai