# ChatOpenAI
```
pip install -U "langchain[openai]"
```
```python
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model="gpt-5.5")
```
## Knobs worth knowing
- `use_responses_api` - picks the OpenAI Responses API vs the Chat Completions API.
- `base_url` - point at an OpenAI-compatible endpoint (Together, vLLM, and similar) while keeping `model_provider="openai"` semantics. Provider-specific fields from routers may not be preserved through this path.
- `openai_proxy` - HTTP proxy for deployments that need one.
- `max_retries` / `timeout` - resilience (see the retry skill). Defaults: up to 6 retries on 429/5xx/network errors.
## Routers get their own package
- OpenRouter: `ChatOpenRouter` from `langchain-openrouter`
- LiteLLM: `ChatLiteLLM` / `ChatLiteLLMRouter` from `langchain-litellm`
Do not point ChatOpenAI at a router's base URL and expect router-specific fields to survive. The docs call this out explicitly.
## Rules
- The key comes from OPENAI_API_KEY in the environment. Never paste a real key into code or chat.
- For streaming token usage metadata from OpenAI, you must opt in on the integration; usage is not returned in streaming chunks by default.