Start a fresh conversation on chatgpt.com without signing in by default, or continue a caller-provided conversation URL, submit one or more caller-provided prompts, and record the resulting assistant answers. The workflow supports German or other prompt languages, detailed image-generation requests, optional reference attachments, and multi-image rendering plans.
Use Cases
Use when the caller needs a fresh ChatGPT conversation or wants to continue an existing https://chatgpt.com/c/{conversation-id} or https://chatgpt.com/uc/{conversation-id} conversation and submit prompts. Use the optional attachment branch when the prompt asks ChatGPT to create or edit an image using reference images or other files. For a series of consistent renderings, submit the caller's complete rendering brief and any requested image number/view as a prompt, waiting for each generation to finish before sending the next.
Automation Flow
- For a fresh chat, navigate directly to
https://chatgpt.com/. An optional model-selection query may be appended when explicitly requested, for examplehttps://chatgpt.com/?model={model}. To continue an existing conversation, navigate directly to the exact caller-providedhttps://chatgpt.com/c/{conversation-id}orhttps://chatgpt.com/uc/{conversation-id}URL. Never guess an opaque conversation ID. - Remain logged out unless the caller requires an authenticated conversation or ChatGPT requires authentication for the requested capability; if authentication is required, complete the site's sign-in flow before using the composer.
- If a cookie or consent overlay blocks the composer, dismiss
button[data-testid='close-button']when present; otherwise use the visible Reject/Accept control, orbutton[aria-label='Close']when that is the available close control. Do not continue until the composer is usable. - For ordinary prompts, type into the first available composer among
div#prompt-textarea,textarea[name='prompt-textarea'], andtextarea#mobile-composer-prompt. For a contenteditablediv#prompt-textareathat does not accept ordinary typing reliably, focus it and insert the caller's prompt withdocument.execCommand('insertText', false, {prompt}), then verify that its text is present. - For an image-generation prompt with reference files, attach all caller-provided files before submitting the prompt. Use the page's visible attachment control or an available
input[type='file']; verify that attachment previews or filenames appear before sending. If the caller supplied image URLs rather than files, obtain the files through the caller-approved download mechanism first, then attach the resulting files. - Submit by pressing Enter or using the enabled
button#composer-submit-buttonwhen present. Other observed controls includebutton[aria-label='Send message'],[data-testid='send-button'], andbutton[aria-label='Send prompt']; use one only when it is visible and enabled. If those controls are unavailable, use the enabled send control identified by its accessible label or currentdata-testid;button[type='submit']may be used when it is the page's active composer submit button. - After each submission, wait for the new assistant message or image result to finish generating before sending the next prompt. Prefer waiting until the active generation/Stop control disappears and the assistant node has nonempty text; text such as
Generating,Creating image,hang tight, orThinkingnear the end of the page is also a useful progress signal, but a fixed timeout alone is not reliable for long answers or image generation. - ChatGPT may move a fresh conversation to an opaque URL of the form
https://chatgpt.com/uc/{conversation-id}, while an already-created conversation may remain at/c/{conversation-id}. Continue extraction on the current URL; do not guess either identifier. - After the requested responses are complete, scroll the main conversation container through the full thread if generated images may be lazy-loaded, then run this evaluator on the current conversation page:
(async () => {
const visible = node => {
const style = getComputedStyle(node);
const rect = node.getBoundingClientRect();
return style.display !== 'none' && style.visibility !== 'hidden' && rect.width > 0 && rect.height > 0;
};
const scroller = document.querySelector('main [class*=overflow-y-auto]') || document.querySelector('main');
if (scroller) {
for (let i = 0; i < 12; i++) {
scroller.scrollTop = i * 1500;
await new Promise(resolve => setTimeout(resolve, 250));
}
}
const answers = [...document.querySelectorAll('[data-message-author-role="assistant"]')]
.filter(visible)
.map(node => (node.innerText || node.textContent || '').trim())
.filter(Boolean);
const images = [...document.querySelectorAll('img')]
.filter(visible)
.map(img => {
const src = img.currentSrc || img.src || '';
const id = (src.match(/estuary\/content\?id=([^&]+)/) || [])[1] || null;
return {src: src || null, id, alt: (img.alt || '').trim()};
})
.filter(image => image.src && (/^blob:|^data:|image|generated|dalle|oai|estuary\/content/i.test(image.src + ' ' + image.alt)));
const uniqueImages = [...new Map(images.map(image => [image.id || image.src, image])).values()];
return {
answers,
images: uniqueImages,
count: answers.length,
imageCount: uniqueImages.length,
url: location.href
};
})()- Return answers in chronological order and, for image requests, return the visible generated-image records. For a single ordinary prompt, the final response text is
answers[answers.length - 1]. If counts are lower than requested, report observed counts rather than fabricating missing results.
Possible Friction Points
- ChatGPT may show a consent overlay even while logged out; it can intercept the composer until dismissed.
- The overlay close control has appeared as
button[data-testid='close-button']andbutton[aria-label='Close']; inspect only these known close controls rather than clicking an arbitrary button. - The composer has appeared as
textarea[name='prompt-textarea'],div#prompt-textarea, and the mobile composertextarea#mobile-composer-prompt; support all three selectors. - On some layouts, direct typing into the contenteditable composer is unreliable. Focusing
#prompt-textareaand usingdocument.execCommand('insertText', false, prompt)is an observed fallback; verify the inserted text before submitting. - Send controls vary by layout. Observed controls include
button#composer-submit-button,button[aria-label='Send message'],[data-testid='send-button'], andbutton[aria-label='Send prompt']; only use an enabled, visible control. button[type='submit']is a fallback only when it is visibly the active composer submit button.- Reference-image tasks require attachments to be present before submission; a typed description alone does not provide the source images.
- Conversation URLs contain opaque UUID-like identifiers. Fresh chats may use
/uc/{conversation-id}and existing chats may use/c/{conversation-id}. Never infer or fabricate either ID. - Assistant messages are structurally marked with
data-message-author-role="assistant"; extract only those nodes, not all rendered text, citations, or user messages. - Generated-image markup can vary. Images may be lazy-loaded as the thread is scrolled, and generated assets may use
estuary/content?id={asset-id}URLs. Deduplicate by asset ID or URL. - Image generation may require authentication even when ordinary text chat is available. If redirected to
/auth/login_with?..., preserve the callback parameters and authenticate only when authorized by the caller. - The
?model={model}query parameter can select a requested model on the landing page; omit it for the default model.