Skip to content

Passing images as input to an agent #727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Bar-Korkos opened this issue May 21, 2025 · 0 comments
Closed

Passing images as input to an agent #727

Bar-Korkos opened this issue May 21, 2025 · 0 comments
Labels
question Question about using the SDK

Comments

@Bar-Korkos
Copy link

Bar-Korkos commented May 21, 2025

Question

How can i pass image as input to the Agents?

result = await Runner.run(
    agent,
    [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_image",
                    "detail": "auto",
                    "image_url": f"data:image/jpeg;base64,{b64_image}",
                }
            ],
        },
        {
            "role": "user",
            "content": "What do you see in this image?",
        },
    ],
)

i tried this but if the image is too long it is not working, because the request is too long

@Bar-Korkos Bar-Korkos added the question Question about using the SDK label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about using the SDK
Projects
None yet
Development

No branches or pull requests

1 participant