CHATGPT asks ChatGPT with web search and returns the answer, every source it found, the searches it ran, and the product and place cards it drew.
Request
Response
For example, a trimmed response:
searchQueries (the searches whose results included it), cited (whether the answer cites it inline) and citedText (the answer text each citation backs). Sources that no search returned, such as products, have no searchQueries.
Card layout
layout appears when ChatGPT draws the answer as cards. Its nodes follow the order ChatGPT shows them:
Include flags
CHATGPT honors every response flag. All are on by default except rawResponse and html; send false to turn one off.
Card details
Withinclude.entityDetails, every card in the answer (a product, place, app or brand) comes with the detail panel ChatGPT opens when a reader clicks it: a description, specifications, reviews and the pages behind them. Panels cite their own pages, so they show sources the answer text leaves out.
error is ENTITY_DETAIL_FAILED when the panel request fails, ENTITY_DETAIL_EMPTY when the panel has no text, and ENTITY_DETAIL_UNAVAILABLE when the answer lacks the conversation or turn credentials needed to open its panels. Card details also work with payload.location, CN, HK, fallback answers and include.html.
A panel ChatGPT has written before returns in about a second; one it writes on request takes 10 to 30 seconds, with up to 4 panels at a time. Up to 20 cards per answer are opened. Panels add no credits, and each follow-up answer gets panels of its own.
Follow-up questions
payload.followUps asks up to 4 more questions in the same conversation after the first answer, in order. Each item is one of:
{ "prompt": "..." }: a question of your own.{ "select": { "button": 0, "choices": { "budget": "Under $100" } } }: presses a follow-up form’s button in the previous answer.
button counts the answer’s buttons from 0 and defaults to the first. choices picks options by each choice node’s name, or as an array in the form’s order; a pick is an option’s value or label, or its position from 0. Choices you do not pick keep the option ChatGPT selected, so { "select": {} } sends the button’s own prompt.
followUps in the response lists each further answer with the question that was sent (prompt), what a select pressed (selection: the button label and each choice’s value), and the same fields as the first answer.
When a select cannot be pressed, the remaining follow-ups are not asked, and followUpsStopped gives the follow-up’s index, a code and a message:
The task still completes with the answers it got. Each answer costs 1 credit: the task holds credits for every follow-up and charges only for the answers it returns.
include.analysis, include.citationAnalysis and include.html apply to the first answer. Other engines reject followUps with 400 VALIDATION_ERROR.
Continue a conversation later
To read an answer before you choose the next question, send a newCHATGPT task with payload.continueFrom set to the id of a completed task, plus either a prompt or a select that presses a form in that task’s last answer (the same rules as in followUps).
- An answer that shows a form carries
forms: each form’sbuttons, whose order isselect.button, and itschoiceswith theirname, the option selected at first and theoptions. conversation.idis the task that opened the conversation,turncounts its answers so far, andexpiresAtis the last moment it can be continued, 3 hours after its first answer.- A continuation asks under the last answer of the task you name, so naming the same task twice branches the conversation.
- It keeps the original
countryandlocation. Leave them out or send the same values. - A task of another account or engine, a task that has not completed, or an invalid
selectis rejected with400 VALIDATION_ERROR. An expired conversation is rejected with400 CONVERSATION_EXPIRED. Neither is charged. - A continuation costs the same as any ChatGPT task.