Skip to main content

Documentation Index

Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Agent Platform exposes a RESTful API for managing agents, sessions, chat interactions, deployments, voice, analytics, and more. This page covers authentication, request format, error handling, rate limits, and pagination conventions that apply to every endpoint.

Base URL and versioning

All API requests use your platform instance’s base URL that is https://agents.kore.ai. Endpoints are versioned with a /api/v1/ prefix for core APIs, or scoped under /api/projects/:projectId/ for project-level resources.
ScopeBase pathExample
Global (v1)/api/v1//api/v1/chat/agent
Project-scoped/api/projects/:projectId//api/projects/abc123/sessions
Agent discovery/api/agents//api/agents/my-agent
The platform uses URL-path versioning. Current version: v1. When breaking changes are introduced, a new version prefix (e.g., /api/v2/) is added. Previous versions remain available during a documented deprecation window. Non-versioned project-scoped routes (/api/projects/:projectId/...) follow the same stability guarantees as v1.

Authentication

Every authenticated endpoint requires one of the following credential types passed in request headers.

JWT Bearer token

Issued after user login. Include in the Authorization header:
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  https://agents.kore.ai/api/v1/chat/agent

API key

Long-lived keys prefixed with abl_. Pass as a Bearer token:
curl -H "Authorization: Bearer abl_sk-your-api-key" \
  https://agents.kore.ai/api/v1/chat/agent
For service-to-service calls, you can also use the X-API-Key header:
curl -H "X-API-Key: ak_your_api_key" \
  https://agents.kore.ai/api/v1/chat/send

SDK session token

Short-lived tokens for embedded widget sessions. Pass via the X-SDK-Token header:
curl -H "X-SDK-Token: sdk_token_value" \
  https://agents.kore.ai/api/v1/chat/agent

Public API key (widgets only)

Public widget keys start with pk_ and are safe to expose in client-side code when they are origin-restricted. They are used in two places:
  • Widget configuration endpoints accept the key via the X-API-Key header.
  • SDK session bootstrap exchanges the key on POST /api/v1/sdk/init via the X-Public-Key header and returns a short-lived SDK session token.
Widget configuration example:
curl -H "X-API-Key: pk_your-public-key" \
  https://agents.kore.ai/api/v1/sdk/config/PROJECT_ID
SDK session bootstrap example:
curl -X POST \
  -H "X-Public-Key: pk_your-public-key" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}' \
  https://agents.kore.ai/api/v1/sdk/init
Public API keys are scoped to a project and provide limited permissions for SDK usage. Configure allowed origins to prevent unauthorized use:
{
  "allowedOrigins": ["https://your-app.example.com", "https://staging.your-app.example.com"]
}
The runtime validates the Origin header on every SDK request and rejects requests from unlisted origins.

Request and response format

Request format

  • Content-Type: application/json for all request bodies (unless otherwise noted).
  • Character encoding: UTF-8.
  • Maximum body size: 1 MB for standard endpoints. Import endpoints accept up to 60 MB.
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer abl_sk-your-api-key" \
  -d '{"projectId":"proj_abc","message":"Hello"}' \
  https://agents.kore.ai/api/v1/chat/agent

Success response

{
  "success": true,
  "data": { ... }
}
Some endpoints return a domain-specific top-level key (e.g., sessions, agents, deployment) instead of a generic data wrapper. The success field is always present.

Error response

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Agent not found: my-agent"
  }
}
Some endpoints return a simplified error format:
{
  "error": "Project not found"
}

Error handling

HTTP status codes

CodeMeaningWhen it occurs
200OKSuccessful read or update
201CreatedResource created successfully
400Bad RequestValidation failed, missing required fields
401UnauthorizedMissing or invalid authentication credentials
403ForbiddenValid credentials but insufficient permissions
404Not FoundResource does not exist or is not accessible to the caller
409ConflictDuplicate resource (e.g., secret already exists)
413Payload Too LargeRequest body exceeds size limit
429Too Many RequestsRate limit or concurrency limit exceeded
500Internal Server ErrorUnexpected server-side failure
503Service UnavailableRequired backend service not configured or offline
Privacy note: Cross-tenant access attempts return 404 (not 403) to avoid revealing resource existence.

Error codes

CodeHTTP statusDescriptionResolution
BAD_REQUEST400Invalid or missing request parametersCheck request body against the endpoint schema
VALIDATION_ERROR400Invalid request parametersReview field values and types
UNAUTHORIZED401Authentication failedVerify your token or API key is valid and not expired
FORBIDDEN403Insufficient permissionsCheck that your credentials have the required scope
NOT_FOUND404Resource not foundConfirm the resource ID and that you have access
RATE_LIMIT_EXCEEDED429Rate limit exceededWait for the rate limit window to reset and retry
QUEUE_FULL429Execution queue at capacityReduce concurrency or retry after retryAfterMs
INTERNAL_ERROR500Unexpected server errorRetry after a brief delay; contact support if persistent
SERVICE_UNAVAILABLE503Backend dependency offlineRetry later; the service may be starting up

Rate limits

The platform enforces per-tenant rate limits on all authenticated endpoints. When a rate limit is exceeded, the API returns 429 Too Many Requests.
Limit typeScopeDescription
Request ratePer tenantMaximum requests per second across all endpoints
Session message ratePer sessionMaximum messages per session per minute
Concurrent sessionsPer tenantMaximum concurrent active sessions
Voice roomsGlobalMaximum concurrent LiveKit voice rooms

Rate limit headers

HeaderDescription
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the current window resets
Retry-AfterSeconds until you can retry (present on 429)
Rate-limited responses also include a retryAfterMs field in the JSON body:
{
  "error": "Session message rate limit exceeded",
  "retryAfterMs": 2000
}
Best practice: Implement exponential backoff for 429 and 503 responses.

Pagination

List endpoints support offset-based pagination via query parameters:
ParameterTypeDefaultDescription
limitinteger50Number of items to return (max 200)
offsetinteger0Number of items to skip

Paginated response

{
  "success": true,
  "sessions": [ ... ],
  "pagination": {
    "total": 142,
    "limit": 50,
    "offset": 0
  }
}
Use total to determine whether more pages exist:
# Fetch page 2
curl "https://agents.kore.ai/api/projects/proj_abc/sessions?limit=50&offset=50" \
  -H "Authorization: Bearer abl_sk-your-api-key"

Streaming (SSE)

Streaming endpoints (e.g., /api/v1/chat/stream) use Server-Sent Events (SSE). The response uses Content-Type: text/event-stream and delivers named events:
event: text_delta
data: {"delta":"Hello"}

event: usage
data: {"inputTokens":52,"outputTokens":14}

event: complete
data: {"inputTokens":52,"outputTokens":14,"totalTokens":66,"latencyMs":1200}
SSE connections send periodic heartbeat comments (: heartbeat) every 15 seconds to keep the connection alive through proxies.

Consuming SSE in JavaScript

For environments where WebSocket connections are not available, use the SSE-based streaming endpoint:
const response = await fetch('/api/v1/chat/stream', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer your-token',
  },
  body: JSON.stringify({
    sessionId: 'session-id',
    message: 'Hello',
  }),
});

const reader = response.body.getReader();
const decoder = new TextDecoder();

while (true) {
  const { value, done } = await reader.read();
  if (done) break;
  const chunk = decoder.decode(value);
  // Parse SSE events from chunk
}

CORS

Widget and SDK endpoints set appropriate CORS headers based on configured allowed origins. When embedding widgets, register your domains in the SDK channel configuration.

Next steps

  • Conversation API — Send messages and interact with agents
  • Management APIs — Manage agents, multi-agent workflows, and tools
  • SDKs — Embed agents in your web application