Materialize an API Chat
Surface an API-created chat into chat history and return a shareable deep link.
Chats created through POST /chat/completions stay out of chat history (both the GC AI web app and chat search) until you materialize them. Use the chat_id from a completed completion response. The endpoint is idempotent. Calling it again on an already-materialized chat returns the same link without side effects.
Pass project_id to file the chat into a project at the same time, so it is browsable under GET /projects/{id}/chats. This requires write access to the project and files a chat that is already materialized.
Authorization: User-scoped keys can only materialize chats they created. Organization-scoped keys can only materialize chats created by other organization-scoped keys.
See Chat Visibility for how this works.
Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Path Parameters
The chat ID
Body
File the chat into this project while materializing it. Requires write access to the project. Omit to leave the chat unfiled.
Response
Chat materialized (or already materialized)
The chat ID
The chat title, if generated
Deep link to open the chat in the GC AI web UI
When the chat was materialized
Project the chat is filed under, or null if unfiled