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 fromchoices[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.
