# Inconsistent image\_url Formats in ChatOpenAI vs. ChatGoogleGenerativeAI

**URL:** <https://forum.langchain.com/t/inconsistent-image-url-formats-in-chatopenai-vs-chatgooglegenerativeai/405>\
**Category:** LangChain\
**Tags:** product-feedback, python-help\
**Created:** [July 11, 2025, 8:28pm UTC](https://forum.langchain.com/t/inconsistent-image-url-formats-in-chatopenai-vs-chatgooglegenerativeai/405 "2025-07-11T20:28:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![p-karunya](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/p-karunya/32/155_2.png) [@p-karunya](https://forum.langchain.com/u/p-karunya)\
**Post date:** [July 11, 2025, 8:28pm UTC](https://forum.langchain.com/t/inconsistent-image-url-formats-in-chatopenai-vs-chatgooglegenerativeai/405/1 "2025-07-11T20:28:47Z")

</div>

I’ve noticed that `ChatOpenAI()` only accepts an object for `image_url` input, whereas `ChatGoogleGenerativeAI()` accepts a plain string. I’d like to clarify which payload shape is intended to be “standard” and whether this difference should be elevated as a bug or feature request.

### ChatOpenAI (Object-Only)

```auto
// This fails if sent as a string:
{"type": "image_url", "image_url": { "url": "https://example.com/foo.png" }}

```

### 3.2 ChatGoogleGenerativeAI (String OK)

```auto
// This works for Google but not OpenAI:
{"type": "image_url", "image_url": "https://example.com/foo.png"}

```

I welcome any insights on whether this divergence is by design or an oversight. If it’s better addressed as a bug report or a spec enhancement, please let me know. Thanks in advance for your guidance!

---

<div class="post-metadata">

**Author:** ![chester-lc](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@chester-lc](https://forum.langchain.com/u/chester-lc)\
**Post date:** [July 12, 2025, 12:47am UTC](https://forum.langchain.com/t/inconsistent-image-url-formats-in-chatopenai-vs-chatgooglegenerativeai/405/2 "2025-07-12T00:47:13Z")

</div>

Hi @p-karunya, thanks for posting this.

The first format is OpenAI’s [chat completions format](https://platform.openai.com/docs/guides/images-vision?api-mode=chat#giving-a-model-images-as-input) and is accepted by all models that support image inputs.

It looks like ChatGoogleGenerativeAI implemented support for `image_url` passed as a string as a convenience, but this is not standard.

See [this guide](https://python.langchain.com/docs/how_to/multimodal_inputs/) for more on working with multi-modal inputs in LangChain.
