# convert_to_openai_image_block

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/messages/block_translators/openai/convert_to_openai_image_block)

Convert `ImageContentBlock` to format expected by OpenAI Chat Completions.

## Signature

```python
convert_to_openai_image_block(
    block: dict[str, Any],
) -> dict
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `block` | `dict[str, Any]` | Yes | The image content block to convert. |

## Returns

`dict`

The formatted image content block.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/8fec4e7ceee2c368b068c49f9fed453276e210e7/libs/core/langchain_core/messages/block_translators/openai.py#L22)