Skip to content

Supported providers

Choose a service, then use an API key or an account login supported by that service. A model specification is provider:model; the provider selects the endpoint and credentials, and the model name is passed to the service.

Use an API key

Start with OpenAI, Anthropic, Google Gemini, OpenRouter, Grok, or TypeSafe. Republic also includes Azure OpenAI, DeepSeek, Moonshot AI, Z.ai, MiniMax, Mistral AI, and Together AI. Ollama and Magpie run locally and need no key. Each page shows the environment variable and a complete request.

Use an account login

Reuse a Codex ChatGPT login, GitHub CLI login for Copilot, or Grok CLI login. New authorization is also available through Copilot Plugin device login and OpenRouter PKCE.

See authentication for credential storage and renewal.

Provider support

The first chat format in each row is the default. Formats describe the available protocols; feature support also depends on the model and your account.

Service Registered name Model kinds Chat formats Default credentials
OpenAI openai Chat, embeddings responses, chat REPUBLIC_OPENAI_API_KEY
Anthropic anthropic Chat messages REPUBLIC_ANTHROPIC_API_KEY
Google Gemini google Chat, embeddings gemini REPUBLIC_GOOGLE_API_KEY
OpenRouter openrouter Chat, embeddings, decisions responses, messages, chat REPUBLIC_OPENROUTER_API_KEY
TypeSafe typesafe Decisions — REPUBLIC_TYPESAFE_API_KEY
Codex codex Chat responses Codex file login
GitHub Copilot github-copilot Chat chat, responses, messages GitHub CLI login
Grok grok Chat responses, chat Grok file login
Azure OpenAI azure-openai Chat, embeddings responses, chat REPUBLIC_AZURE_OPENAI_API_KEY
DeepSeek deepseek Chat chat, responses, messages REPUBLIC_DEEPSEEK_API_KEY
Moonshot AI moonshot Chat chat REPUBLIC_MOONSHOT_API_KEY
Z.ai zai Chat chat REPUBLIC_ZAI_API_KEY
MiniMax minimax Chat messages, chat REPUBLIC_MINIMAX_API_KEY
Mistral AI mistral Chat, embeddings chat REPUBLIC_MISTRAL_API_KEY
Together AI together Chat, embeddings chat REPUBLIC_TOGETHER_API_KEY
Ollama ollama Chat, embeddings chat, responses None for a local server
Magpie magpie Chat, decisions chat, responses, messages None; the gateway holds credentials

Select a model and format

Replace MODEL_ID with a model available to your account. To select a supported chat format explicitly:

from republic import get_model

model = get_model("openai:MODEL_ID", api_format="chat")

Chat models use get_model() with chat() or stream(). Embedding models use get_embedding_model() with embed() or embed_many(). Decision models use get_decision_model() with decide(); TypeSafe supports this model kind only.

Explicit auth= and API keys take precedence over default CLI credentials. See configuration for the complete lookup order, custom endpoints, and HTTP client options.

For the shared API contracts, see the provider API specification.