# `PhoenixKitAI.Providers.OpenAICompatible`
[🔗](https://github.com/BeamLabEU/phoenix_kit_ai/blob/0.23.0/lib/phoenix_kit_ai/providers/openai_compatible.ex#L1)

The default `PhoenixKitAI.Provider` adapter: what any OpenAI-shaped API
offers with no provider-specific knowledge.

  * **Editing** goes through `POST <base_url>/chat/completions` with the
    prompt and the images as `image_url` content parts — the way
    gateways serve image-capable chat models (Gemini's image models,
    for one). The output arrives on `choices[0].message.images[]` or as
    an image content part. An `aspect_ratio` option travels as Gemini's
    `image_config`.
  * **Generation** goes through `POST <base_url>/images/generations`.
  * No model capability listing.

The other adapters reuse its pieces (`chat_edit/5`, `post_images/4`,
the decoders) and override only the transport that differs.

# `vision`

Vision through chat completions: `messages` already carry the image
parts; `options` may hold `:response_format` and the sampling keys.
Not every model behind a chat endpoint takes `response_format`
(image-output models answer 400), so a 4xx on a JSON request is retried
once without the field — the prompt asks for JSON anyway.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
