# One API in front of every provider dialect

> OpenAI /chat/completions, Anthropic /messages, and a Responses API — same key, same catalog.

Chat Completions, Messages, and Responses on one key

**Slug**: `unify-api`  
**URL**: https://anyrouter.dev/use-cases/unify-api  
**Markdown**: https://anyrouter.dev/use-cases/unify-api.md  
**Short link**: https://anyrouter.dev/u/unify-api  

## Why use this

Apps accumulate one client per vendor. Failover and logging then live in your code instead of the gateway.

## Set it up

1. Use https://anyrouter.dev/api/v1 for OpenAI-compatible calls.
2. Use https://anyrouter.dev/api for Anthropic /messages (Claude Code, Agent SDK).
3. Start with anyrouter/auto so the first request is not a single upstream.

## Code

### curl · anyrouter/auto

```bash
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anyrouter/auto",
    "messages": [{ "role": "user", "content": "Say hello in one sentence." }]
  }'
```

## Related

- [openai-sdk](https://anyrouter.dev/use-cases/openai-sdk)
- [ai-sdk](https://anyrouter.dev/use-cases/ai-sdk)
- [coding-agents](https://anyrouter.dev/use-cases/coding-agents)
