Skip to main content
Requires an account-linked API key or signed-in session from the project team. The runtime must already be Ready; this call does not start a demo.

Request

Each message allows up to 16,000 characters; combined content allows up to 64,000. These request limits do not guarantee that input fits the model’s token context. Additional fields are rejected.

Response

Read the assistant’s text from choices[0].message.content. A successful response includes a chat completion ID, the project ID as model, a choice with its finish reason, and usage when reported by the runtime.

Errors

Runtime failures include error and code. Check access status before retrying. Avoid unbounded retries while a model is loading.