# 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.

- Page: https://models.litellm.ai/models/davinci-002
- Lab: OpenAI
- LiteLLM model name: `davinci-002`
- Context window: 16,384 tokens
- Max output: 4,096 tokens
- Deprecation date: September 28, 2026
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| OpenAI | `davinci-002` | $2.00 | $2.00 | – | – | – | 16K |
| OpenAI (fine-tuned) | `ft:davinci-002` | $12.00 | $12.00 | – | – | – | 16K |

## Cost examples

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

- OpenAI: $5.00
- OpenAI batch: $2.50

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="davinci-002",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## 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.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
