Skip to content

ImageGenerationCall input param type incorrectly requires result and status #2648

@DouweM

Description

@DouweM

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

This "Using image ID" example shows they are not required:

https://platform.openai.com/docs/guides/image-generation?multi-turn=imageid&image-generation-model=gpt-image-1#multi-turn-image-generation

The code incorrectly claims they are:

class ImageGenerationCall(TypedDict, total=False):
id: Required[str]
"""The unique ID of the image generation call."""
result: Required[Optional[str]]
"""The generated image encoded in base64."""
status: Required[Literal["in_progress", "completed", "generating", "failed"]]
"""The status of the image generation call."""
type: Required[Literal["image_generation_call"]]
"""The type of the image generation call. Always `image_generation_call`."""

To Reproduce

Run the referenced example, see that it works, despite a typing error.

Code snippets

OS

macOS

Python version

3.12.9

Library version

1.107.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions