Create Chat Completion
Send a message to GC AI and receive an AI-generated response.
Async behavior
Set wait=0 or Prefer: wait=0 to enqueue the completion and return immediately with a pending job envelope. Otherwise the endpoint blocks up to the effective wait window before returning.
Server-side tools
The model can invoke tools automatically while generating a response. Tool calls happen server-side. Only the final assistant text is returned in result.result.
| Tool | Description | Key type |
|---|---|---|
| Document reading | Read, query, and search within attached files | All |
| Web search | Search the web for current information | All |
| Research agent | Multi-step web research with synthesis | All |
| Case-law lookup | Search case law databases | User-scoped only |
| Playbook review | Run playbook checks against attached files (requires playbook_id) | User-scoped only |
The following tools are not available via API in beta (the response is plain text with no channel for rich outputs):
| Tool | Reason unavailable |
|---|---|
| Document generation | Produces a downloadable file |
| Slide generation | Produces a downloadable file |
| Diagrams | Produces an inline visual |
| Email drafting | Produces a structured email object |
| Document editing | Requires an active Word session |
| Interactive clarification | Requires a back-and-forth channel with the caller |
Documentation Index
Fetch the complete documentation index at: https://docs.gc.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Headers
Optional RFC 7240 wait preference, for example wait=0. If both this header and the wait query parameter are supplied, they must match.
"wait=0"
Query Parameters
Optional long-poll wait time in seconds. Use 0 for fire-and-forget behavior. If both wait and Prefer: wait=... are supplied, they must match. Values above 90 are clamped.
x >= 00
Body
The user's message or prompt
1"What are the key terms to look for in a software license agreement?"
Optional uploaded file IDs to attach as context for this completion. Upload files first via POST /files.
["123e4567-e89b-12d3-a456-426614174000"]Optional playbook ID to ground the completion in. The model uses the playbook's checks and guidance to structure its review of the attached files. Discover playbooks via GET /playbooks.
Requires a user-scoped API key (u:gcai_...).
"f9e8d7c6-b5a4-3210-fedc-ba0987654321"
Response
Job completed within the effective wait window
Async job identifier
Stable job kind for this endpoint
chat/completions Current job status
pending, running, succeeded, failed, canceled Completion payload when the job has succeeded
Failure payload when the job has failed
ISO 8601 creation timestamp
ISO 8601 completion timestamp, or null when not terminal