Base URL
Authentication
Include your API key in theAuthorization header with every request:
How to Get Your API Key
Sign in and go to Profile → API Keys to generate your key. Copy the full key as-is.Authentication Methods
Option 1: Authorization Header (Recommended)Rate Limits
- Per minute: 30 requests
- Per day: 1,000 requests
Rate Limit Headers
Every response includes headers showing your current usage:Rate Limit Exceeded
When you exceed a limit, you’ll receive a429 response:
Retry-After header with the number of seconds to wait.
Response Format
All endpoints return a consistent JSON structure:Success Response
Error Response
HTTP Status Codes
| Status | Code | Meaning |
|---|---|---|
200 | - | Success |
400 | - | Bad request - check your parameters |
401 | INVALID_API_KEY | API key is invalid or revoked |
404 | - | Resource not found |
429 | RATE_LIMIT_EXCEEDED | Rate limit exceeded |
500 | API_ERROR | Server error |
Endpoints
POST /chat
Send a message to Gigabrain’s Intelligence Collective and receive AI-powered market analysis. Request:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
message | string | Yes | - | Your query to the Intelligence Collective |
stream | boolean | No | false | Enable streaming response |
GET /sessions
Retrieve your chat session history. Request:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 10 | Number of sessions to return |
Code Examples
Python
JavaScript (Node.js)
cURL
Error Handling
401 Unauthorized
Invalid or revoked API key.429 Too Many Requests
Rate limit exceeded.retryAfter (seconds) or resetAt (timestamp) before making another request.
500 Internal Server Error
Server error occurred.session_id.
Best Practices
-
Secure Your API Key
- Never expose in client-side code or public repositories
- Use environment variables to store keys
- Rotate keys periodically
-
Handle Rate Limits
- Monitor rate limit headers in responses
- Implement exponential backoff when hitting limits
- Cache responses when appropriate
-
Error Handling
- Always handle API errors gracefully
- Implement retry logic for transient errors (500, 503)
- Log
session_idfor debugging and support requests
-
Optimize Requests
- Batch related queries when possible
- Use streaming for real-time responses
- Implement request timeouts
Support
Need help? We’re here for you:- Email: [email protected]
- Telegram: t.me/gigabraingg
- Your API key (first 10 characters only)
- Session ID from error responses
- Request/response examples
Ready to build? Get your API key from your Profile and start integrating!