Get Started
This quickstart guide will help you make your first request to the Concentrate AI API. You’ll be generating AI responses in minutes.Get your API key
Sign up for a Concentrate AI account and create an API key from your dashboard.
- Visit concentrate.ai
- Sign up or log in
- Navigate to API Keys
- Click Create API Key
- Copy your key (it starts with sk-cn)
Optional: configure guardrails
Guardrails are API-key-level redaction settings.See Guardrails & Redaction for details.
- Go to Guardrails in the dashboard
- Select your API key
- Enable redaction and choose target (
input,output, orboth) - Select entity types and save
Output redaction is applied to non-streamed responses. Streamed output (
"stream": true) is not redacted.Make your first request
Try the API with a simple cURL request:You should receive a response like this:
Try Different Models
Concentrate AI supports 50+ models. Try different ones to compare:Try Streaming
Enable real-time streaming for a better user experience:Try Tool Calling
Enable your AI to call functions and use external tools:function_call indicating it wants to use the tool. See the Tool Calling Guide for the complete multi-turn workflow.
Common Patterns
Multi-Turn Conversation
Control Parameters
Error Handling
Next Steps
Now that you’ve made your first request, explore more features:API Reference
Complete API documentation
Streaming Responses
Real-time streaming guide
Auto Routing
Automatic model selection
Error Handling
Handle errors gracefully
Best Practices
Set token limits
Set token limits
Always set
max_output_tokens to prevent unexpectedly long responses:Use environment variables
Use environment variables
Never hardcode API keys. Use environment variables:
Implement retry logic
Implement retry logic
Handle transient errors with exponential backoff:
Monitor usage
Monitor usage
Track token usage to manage costs:
Need Help?
View Examples
See more code examples
Contact Support
Get help from our team