Skip to content
AI GatewayAI Gateway Manual

OpenAI

How to connect an OpenAI Provider, which embedding and image generation models it supports, and their built-in prices.

This guide covers only what differs for the OpenAI type. For adding the Provider, reviewing models, and allowing them in projects, follow Connect model Providers.

Request typeSupportSetting to turn on
ChatSupportedNone
EmbeddingsSupportedNone
Image generationSupportedNone
  1. Choose OpenAI as the Provider type. Base URL is filled with https://api.openai.com.
  2. Enter an API key issued by OpenAI in Credential.

AI Gateway provides built-in prices for OpenAI models, and administrators cannot change them. See Model pricing and costs.

An OpenAI Provider accepts POST /v1/embeddings with no extra setting. Once you add <Provider name>/<model ID> to a project’s model allow policy, users call it with a Gateway Key from that project. See the OpenAI SDK embedding examples.

Each call returns one non-streaming response. You can send a string, a batch of strings, a token array, or a batch of token arrays. Use dimensions values that the target model supports. Both float and base64 responses are supported.

The following models have built-in input prices. We checked OpenAI’s pricing and model documentation on 2026-11-09. Prices are in USD per million input tokens.

Model IDInput price
text-embedding-3-small$0.02
text-embedding-3-large$0.13
text-embedding-ada-002$0.10

An OpenAI Provider accepts POST /v1/images/generations with no extra setting. The response passes through the URL or b64_json that the model supports. AI Gateway does not download images from URLs or provide a download proxy, and URL expiry and access conditions follow OpenAI’s policy.

The following models have built-in image prices reviewed against OpenAI’s official price list. Built-in prices are read-only, and Image pricing on the Pricing tab shows their source link, review date, and version.

ModelOpenAI shutdown date
gpt-image-2.6-sunburst, gpt-image-2.6-flareNone
gpt-image-2.5-sunburst, gpt-image-2.5-flare, and their -2026-09-08 snapshotsNone
gpt-image-2, gpt-image-2-2026-04-212027-02-10
gpt-image-1.5, gpt-image-1.5-2025-12-16, chatgpt-image-latest, gpt-image-1-mini2026-12-01

OpenAI’s price list has no text output rate for the gpt-image-2 family. If a response from one of these models reports positive text output tokens, the cost is Unavailable. gpt-image-1, which shut down on 2026-10-23, has no built-in price.

How the tokens of SVG output and of the Responses API image generation tool are charged is covered in Costs settled with the image.