Skip to content

API Reference Overview

Cognipeer Console exposes two HTTP surfaces:

  • Client API under /api/client/v1/ for API-token authenticated integrations.
  • Dashboard/Internal API under /api/ for JWT-authenticated console features such as incidents and health.

Base URL

https://your-gateway.example.com/api/client/v1

Authentication

All client API endpoints require a Bearer token in the Authorization header:

bash
curl -X POST https://gateway.example.com/api/client/v1/chat/completions \
  -H "Authorization: Bearer cgt_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4", "messages": [{"role": "user", "content": "Hello"}]}'

Tokens are created in the dashboard under Settings → API Tokens.

Official SDK

If you are integrating from a TypeScript or JavaScript application, use the official Cognipeer Console SDK.

  • Platform behavior, deployment, and endpoint semantics stay canonical in the Console docs.
  • Method names, request helpers, and framework integrations stay canonical in the SDK docs.

For the relationship between the two, see Using the SDK in this site and the SDK-side Console API Mapping.

Client API Endpoint Map

DomainBase PathMethods
Chat Completions/chat/completionsPOST
Embeddings/embeddingsPOST
Agents/agentsGET
Agent Detail/agents/:agentKeyGET
Agent Responses/responsesPOST
Tools/toolsGET
Tool Detail/tools/:toolKeyGET
Tool Execute/tools/:toolKey/actions/:actionKey/executePOST
MCP Execute/mcp/:serverKey/executeGET, POST
MCP SSE/mcp/:serverKey/sseGET
MCP Message/mcp/:serverKey/messagePOST
Vector Providers/vector/providersGET, POST
Vector Indexes/vector/providers/:key/indexesGET, POST, PATCH, DELETE
Tracing (Custom)/tracing/sessionsPOST
Tracing (OTLP)/tracesPOST
Files/files/bucketsGET, POST
Guardrails/guardrails/evaluatePOST
Prompts/promptsGET, POST
RAG/rag/modulesGET, POST, DELETE
Memory/memory/storesGET, POST, PATCH, DELETE
Config Groups/config/groupsGET, POST
Config Group Items/config/groups/:groupKey/itemsGET, POST
Config Item/config/items/:keyGET, PATCH, DELETE
Config Resolve/config/resolvePOST
Config Audit/config/items/:key/auditGET

Dashboard And Operational Endpoints

These endpoints are documented here because operators often need them during rollout, but they are not part of the /api/client/v1 customer surface.

DomainBase PathAuthMethods
Incidents/api/alerts/incidentsJWT sessionGET, PATCH, POST
Health/api/health/live, /api/health/readyPublicGET

Request Format

  • Content-Type: application/json (except file uploads)
  • Max body size: configurable via NEXT_BODY_SIZE_LIMIT (default 10MB)
  • Request IDs: Include request_id in the body for correlation

Response Format

All responses follow a consistent JSON structure:

Success:

json
{
  "data": { ... },
  "request_id": "req_abc123"
}

Error:

json
{
  "error": "Human-readable error message"
}

HTTP Status Codes

CodeMeaning
200Success
201Created
400Bad request (missing/invalid parameters)
401Invalid or missing API token
403Feature not available in license
404Resource not found
409Conflict (duplicate resource)
422Unprocessable (validation failure)
429Rate limit exceeded
500Internal server error
503Service unavailable (circuit breaker open or shutting down)

Rate Limiting

Requests are rate-limited per token based on the tenant's plan:

PlanRequest Limit
FREE1,000/month
STARTER10,000/month
PROFESSIONAL100,000/month
ENTERPRISEUnlimited
ON_PREMISEUnlimited

Rate limit headers are included in responses when applicable.

Quota System

Beyond rate limits, the gateway enforces resource quotas:

  • Token budgets (per-request and monthly)
  • Vector count limits
  • File storage limits
  • Tracing session limits

Quota violations return 429 with a descriptive error message.

Community edition is AGPL-3.0. Commercial licensing and support are available separately.