Retrieve an LLM completion or queue a completion for later retrieval.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The question or instruction of up to 2,047 characters to use as a chat prompt; the prompt requires form or URL encoding (with any space character being replaced by a + character or %20 sequence).
"best basketball shoes for 2026"
The AI model to chat with.
chatgpt, gemini, perplexity (coming soon), copilot (coming soon) "gemini"
The name as returned by the devices resource of the device to emulate chatting on (these names are case insensitive but must include form- or URL-encoded spaces and punctuation marks); device emulation is unused by default.
null
The two-letter ISO code of the country to chat from (these codes are case insensitive); a random country is used by default.
null
The alphanumeric second part (proceeding the separator) of a first-level subdivision code in the (prerequisite) country to chat from (these codes are case insensitive); a random subdivision is used by default.
null
The commonly spelled name of the city in the (prerequisite) country to chat from (these names are temporarily case sensitive and required to include form- or URL-encoded spaces and punctuation marks); a random city is used by default.
null
The commonly spelled name or two-letter ISO code of the language to chat in (these names and codes are case insensitive but required to include form- or URL-encoded spaces and punctuation marks); the language is unset by default.
null
The commonly spelled name or two-letter ISO code of the chat interface’s display language (these names and codes are case insensitive but required to include form- or URL-encoded spaces and punctuation marks); the display language is unset by default or set to the language if given.
null
The format to output to.
json, rendered, raw "rendered"
The age in days of when to consider a cached completion expired, where 0 disables caching.
0 <= x <= 10
The synchronous or asynchronous mode of completion retrieval (see the async resource).
sync, async "sync"
The AI completion.
The AI model that generated the completion.
chatgpt, gemini, perplexity (coming soon), copilot (coming soon) "chatgpt"
The user prompt that the completion was generated for.
"best basketball shoes for 2026"
The rendered HTML of the entire conversation.
"<!DOCTYPE html><html lang=\"en-US\" ..."
The rendered HTML of just the prompt portion of the conversation.
"<h4 class=\"sr-only select-none\">You said: ..."
The rendered HTML of just the completion portion of the conversation.
"<h4 class=\"sr-only select-none\">ChatGPT said: ..."
The rendered HTML of just the sources portion of the conversation.
"<section aria-label=\"Sources\" ..."
The fanout queries that the model searched to generate the completion; only some models expose these queries.
[
"best basketball shoes 2026",
"top rated basketball shoes 2026 reviews",
"best performance basketball shoes 2026",
"best basketball shoes for guards 2026",
"best basketball shoes for wide feet 2026",
"best outdoor basketball shoes 2026",
"most popular basketball shoes 2026"
]The name of the targeted emulated device.
null
The ISO code of the targeted country.
null
The partial ISO code of the targeted subdivision in the country.
null
The common name of the targeted city in the country.
null
The common name or ISO code of the targeted language.
null
The common name or ISO code of the targeted display language.
null