OpenAI-Compatible Providers
OpenAI-Compatible Providers
Section titled “OpenAI-Compatible Providers”The built-in custom provider works with any OpenAI-compatible API using the Chat Completions endpoint.
Configuration
Section titled “Configuration”swixter claude create openai-profile \ --provider custom \ --api-key sk-... \ --base-url https://api.openai.com/v1 \ --model gpt-4oProvider Details
Section titled “Provider Details”| Field | Value |
|---|---|
| Provider ID | custom |
| Wire API | chat |
| Default Base URL | https://api.openai.com/v1 |
| Env Key | OPENAI_API_KEY |
Supported Services
Section titled “Supported Services”Any service with an OpenAI-compatible /v1/chat/completions endpoint works:
| Service | Base URL |
|---|---|
| OpenAI | https://api.openai.com/v1 |
| Groq | https://api.groq.com/openai/v1 |
| Together AI | https://api.together.xyz/v1 |
| DeepSeek | https://api.deepseek.com/v1 |
| Fireworks | https://api.fireworks.ai/inference/v1 |
| OpenRouter | https://openrouter.ai/api/v1 |
Creating a Provider for Each Service
Section titled “Creating a Provider for Each Service”For frequently used services, create a user-defined provider:
swixter providers add deepseek \ --name "DeepSeek" \ --base-url https://api.deepseek.com/v1 \ --wire-api chat \ --env-key DEEPSEEK_API_KEYThen use it when creating profiles:
swixter claude create deepseek-profile --provider deepseekCompatibility
Section titled “Compatibility”- Compatible with all coders (Claude Code, Codex, Continue.dev)
wire_api: "chat"type works universally
Custom env_key
Section titled “Custom env_key”Customize the environment variable used for the API key (especially useful for Codex):
swixter codex create my-profile \ --provider custom \ --env-key GROQ_API_KEY