Overview
Getting Started
Your business gets a custom AI model — trained on your use case, optionally grounded in your own documents — delivered through one simple REST API.
Prerequisites
- An Intgr8AI account with API access (we set this up with you)
- Your API key — see Step 1 below
- Any HTTP client — curl, fetch, requests; no SDK required
Quickstart
Get your API key
- Sign in at intgr8ai.com/dashboard
- Open the API Usage section
- Reveal and copy your key
export INTGR8AI_API_KEY="ik_live_your-key-here"Verify your setup
Confirm the API is reachable with a quick health check (no auth needed).
curl https://intgr8ai-api-26046413214.us-central1.run.app/healthMake your first chat call
Send a conversation to POST /v1/chat. Your key already maps to your custom model — there's no model parameter to think about.
curl https://intgr8ai-api-26046413214.us-central1.run.app/v1/chat \
-H "Authorization: Bearer $INTGR8AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "What is your return policy?"}
]
}'Response:
{
"id": "chat_0936066790104ed6a089a0e9e99453e4",
"message": {
"role": "assistant",
"content": "You can return any item within 90 days..."
},
"usage": { "input_tokens": 27, "output_tokens": 32 },
"model": "support-bot"
}Streaming
Add "stream": true to receive the reply token-by-token as server-sent events — delta chunks, a final usage event, then data: [DONE]. See the API Reference → Stream a chat completion for full examples.
Errors
Errors use a consistent envelope with a request_id (also on every response as the X-Request-Id header) you can reference with support.
{
"error": {
"type": "rate_limit_exceeded",
"message": "Rate limit of 60 requests per minute exceeded.",
"request_id": "49b8d78918eb49308429b4d08ec6c575"
}
}| Status | Type | Description |
|---|---|---|
| 401 | invalid_api_key | Missing or invalid API key. |
| 402 | budget_exceeded | Credit balance is empty — top up to continue. |
| 403 | key_revoked | This key has been revoked. |
| 404 | not_found | Resource does not exist. |
| 413 | input_too_large | Message or document exceeds size limits. |
| 422 | invalid_request | Malformed request body or parameters. |
| 429 | rate_limit_exceeded | Slow down — check the Retry-After header. |
| 502 | upstream_error | Model provider failed; retried once. Safe to retry. |
Rate limits & credits
Default limits are 60 requests/minute and 100,000 tokens/minute per key (custom limits available). On 429, wait the seconds given in Retry-After.
402 budget_exceeded until you top up. Track your balance with GET /v1/usage or in your dashboard.