Send a message to GC AI and receive an AI-generated response.
Set wait=0 or Prefer: wait=0 to enqueue the completion and return immediately with a pending job envelope. Otherwise the endpoint waits up to the effective wait window before returning.
Tools. The model can call internal tools as part of producing the response — for example reading attached files (readDocument, queryDocument, grepDocument), web research (webSearch, fetch, researchAgent), and case-law lookups. Tool calls happen server-side; only the final assistant text is returned in result.result. The set of available tools depends on your API key type and feature flags: org-scoped keys (gcai_*) get document and web/research tools; user-scoped keys (u:gcai_*) additionally get tools that require a user identity, such as case law and playbook review. Tools that produce non-text artifacts (file downloads, inline UI cards) — draftEmail, generateSlides, diagram, generateDocument, editDocument — and the interactive clarification tool (askUserQuestions) are unavailable via API in beta because the response is a single text result with no channel for those outputs.
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.
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → Organization → API Keys.
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"
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
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"]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