Skip to content

Sync OpenAI Tasks guide with upstream callback polling behavior#277

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/sync-update-api-docs-another-one
Draft

Sync OpenAI Tasks guide with upstream callback polling behavior#277
Copilot wants to merge 2 commits into
mainfrom
copilot/sync-update-api-docs-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

The upstream Docs update for openai changed the Tasks API guide to reflect the current callback workflow more accurately. This sync updates the local OpenAI Tasks integration guide so its examples and guidance match the upstream documentation.

  • Tasks API retrieval flow

    • Clarifies that callback-mode image requests return a task_id immediately on submission
    • Repositions id as the default lookup key for /openai/tasks
    • Keeps trace_id documented as an optional correlation mechanism rather than the primary flow
  • Examples and payloads

    • Updates the Python retrieve example to query by id
    • Revises the end-to-end submit-and-poll example to capture submit["task_id"] and poll with that value
    • Aligns sample response type values and batch examples with the upstream guide
  • Guide wording

    • Tightens the request field descriptions to distinguish the recommended path from optional trace-based lookup
    • Adjusts the type/filter descriptions to match the current upstream wording
submit = requests.post(
    f"{API}/openai/images/generations",
    headers=HEADERS,
    json={
        "model": "gpt-image-1",
        "prompt": "a watercolor cat sitting on a desk",
        "callback_url": "https://webhook.site/your-uuid",
    },
).json()

task_id = submit["task_id"]

task = requests.post(
    f"{API}/openai/tasks",
    headers=HEADERS,
    json={"action": "retrieve", "id": task_id},
).json()

Agent-Logs-Url: https://github.com/AceDataCloud/APIs/sessions/e6507fdd-47e0-4a4b-b863-f008a3ec84e9

Co-authored-by: Germey <8678661+Germey@users.noreply.github.com>
Copilot AI changed the title [WIP] Sync API documentation with upstream Docs updates Sync OpenAI Tasks guide with upstream callback polling behavior May 16, 2026
Copilot finished work on behalf of Germey May 16, 2026 05:50
Copilot AI requested a review from Germey May 16, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sync: update from Docs (f3e9701 docs: sync from PlatformBackend (zh-CN base + translations) [automated])

2 participants