Quick Start
1
Get API Key
Obtain your API key from the Comput3 Dashboard.
2
Make Your First Request
Send a simple chat completion request:
curl
3
Handle the Response
Process the JSON response:
API Endpoints
Chat Completions
Endpoint:POST /v1/chat/completions
Create a chat completion with conversation context.
The model to use for completion. Available models:
hermes4:70b- Hermes 4 model (70B parameters) for advanced reasoninghermes4:405b- Largest Hermes 4 model (405B parameters) for complex tasksdeepseek-v3.1- Latest DeepSeek model for coding and general taskskimi-k2- Kimi K2 model for general conversationqwen3-coder:480b- Massive Qwen3 Coder model for advanced coding tasksqwen3-max- Large-scale reasoning and analysisgrok-code-fast-1- Fast coding assistanceclaude-sonnet-4- Creative writing and analysis
Array of message objects representing the conversation history.
Controls randomness. Range: 0.0 to 2.0
Maximum number of tokens to generate
Whether to stream partial message deltas
Sequences where the API will stop generating tokens
SDK Examples
Python
JavaScript/Node.js
Streaming Responses
Enable real-time response streaming for better user experience:Advanced Features
Function Calling
Enable the model to call external functions:Conversation Memory
Maintain conversation context across multiple requests:Error Handling
Implement robust error handling for production applications:Rate Limiting and Optimization
Managing Rate Limits
Request Queuing
Request Queuing
Implement a queue system for high-volume applications:
Token Optimization
Token Optimization
Optimize token usage to reduce costs:
Best Practices
Security
- Store API keys as environment variables
- Use HTTPS for all requests
- Implement proper authentication
- Validate and sanitize user inputs
Performance
- Use appropriate models for each task
- Implement response caching
- Use streaming for long responses
- Monitor token usage and costs
Error Handling
- Implement retry logic with exponential backoff
- Handle rate limiting gracefully
- Log errors for debugging
- Provide fallback responses
User Experience
- Show loading states during API calls
- Implement typing indicators
- Cache frequent responses
- Provide offline functionality where possible