Skip to content

fix: add openai/dall-e base pricing entries - #19133

Merged
1 commit merged into
BerriAI:litellm_staging_01_16_2026from
obod-mpw:add-openai-dalle-base-pricing
Jan 16, 2026
Merged

1 commit merged into
BerriAI:litellm_staging_01_16_2026from
obod-mpw:add-openai-dalle-base-pricing

Conversation

@obod-mpw

@obod-mpw obod-mpw commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🧹 Refactoring

Changes

  • Added base model entries for dall-e-2 and dall-e-3 in model_prices_and_context_window.json for OpenAI image pricing + endpoints

Motivation / Rationale

  • dall-e pricing is documented per model and size missing base entries for OpenAI model keys with default per-image pricing and supported endpoints that can be used in UI and package.
  • dall-e-2 supports edits + variations while dall-e-3 supports generation only; the supported endpoints reflect OpenAI model capabilities.
  • prices taken for 1024-x-1024 default side. Other variants should be applied for cost calculation

References

Testing

  • Tested with local deployment using litellm-proxy docker image and settings LITELLM_MODEL_COST_MAP_URL to this branch raw file.
Proofs

Screenshot 2026-01-15 at 11 23 30

Screenshot 2026-01-15 at 11 24 17

@vercel

vercel Bot commented Jan 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
litellm Ready Ready Preview, Comment Jan 15, 2026 9:01am

@obod-mpw obod-mpw changed the title [Fix] Add openai/dall-e base pricing entries [Fix] add openai/dall-e base pricing entries Jan 15, 2026
@obod-mpw obod-mpw changed the title [Fix] add openai/dall-e base pricing entries fix: add openai/dall-e base pricing entries Jan 15, 2026
@obod-mpw
obod-mpw marked this pull request as ready for review January 15, 2026 09:28
"supports_vision": true
},
"dall-e-2": {
"input_cost_per_image": 0.02,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, could we modify this to use the same standard as DALL-E 3 (1024x1024 price per image)?.

Suggested change
"input_cost_per_image": 0.02,
"input_cost_per_image": 0.0016,

@obod-mpw obod-mpw Jan 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-01-16 at 09 55 38

Sure thing, I was targeting same size 1024-x-1024 for both models, but we can use standard 256-x256 for dall-e-2 and smallest image size approach as default pricing. Or have you missed that sizing (just double checking)?

And smallest one pricing will be 0.016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, There are different prices for DALL-E 2 in OpenAI's docs:

Screenshot 2026-01-16 at 18 18 07

Found this thread: https://community.openai.com/t/mistake-image-sizes-for-the-dall-e-2-and-dall-e-3/1261452, made some calls to OpenAI API and confirms that for DALL-E 2 $0.02 price for 1024x1024 is correct. Thanks @obod-mpw

@ghost ghost added the changes requested label Jan 15, 2026
@Chesars

Chesars commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

Hi @Sameerlite, could we merge this?

@ghost
ghost changed the base branch from main to litellm_staging_01_16_2026 January 16, 2026 23:18
@ghost
ghost merged commit ce1a2c3 into BerriAI:litellm_staging_01_16_2026 Jan 16, 2026
6 of 7 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
This pull request was closed.

This branch was successfully deployed

1 active deployment
Preview — f35f6515 Deployed Jan 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants