LiteLLMModels

Davinci 002 API Pricing

As of October 10, 2026, Davinci 002 costs $2.00 per 1M input tokens and $2.00 per 1M output tokens on OpenAI. It has a 16,384-token context window and returns up to 4,096 tokens per response.

By OpenAIModel ID davinci-002Prices updated Checked
Deprecated: OpenAI lists September 28, 2026 as the deprecation date for davinci-002.
Input
$2.00 / 1M tokens
Output
$2.00 / 1M tokens
Context window
16,384 tokens
Max output
4,096 tokens
Providers
1

Davinci 002 pricing by provider

2 listings across 1 provider. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.

ProviderModel name in LiteLLMInputOutputBatch inBatch outContext
OpenAIdavinci-002$2.00$2.00$1.00$1.0016K
OpenAIfine-tunedft:davinci-002$12.00$12.00$6.00$6.0016K

What Davinci 002 costs in practice

1,000 requests with 2,000 input and 500 output tokens each

OpenAI$5.00
OpenAI batch$2.50

Use Davinci 002 with LiteLLM

Call Davinci 002 through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/completions. LiteLLM tracks the cost of every request at these prices.

Python SDK
from litellm import completion

response = completion(
    model="davinci-002",
    messages=[{"role": "user", "content": "Hello!"}],
)
Proxy config.yaml
model_list:
  - model_name: davinci-002
    litellm_params:
      model: davinci-002
      api_key: os.environ/OPENAI_API_KEY
Call the proxy
curl http://0.0.0.0:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "davinci-002",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Davinci 002 FAQ

How much does Davinci 002 cost?

Davinci 002 costs $2.00 per 1M input tokens and $2.00 per 1M output tokens on OpenAI. Batch requests cost $1.00 per 1M input tokens and $1.00 per 1M output tokens.

What is the context window of Davinci 002?

Davinci 002 has a 16,384-token context window and returns up to 4,096 tokens per response.

Which providers offer Davinci 002?

Davinci 002 is available from OpenAI through LiteLLM, using the model name davinci-002.

How do I call Davinci 002 with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="davinci-002", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

Is Davinci 002 being deprecated?

OpenAI deprecated davinci-002 on September 28, 2026.

Sources

Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:

LiteLLM docs: OpenAI.

Provider pages: OpenAI.