Liking cljdoc? Tell your friends :D

Providers

clojure-llm-sdk ships 36 registered provider profiles across chat, embeddings, moderation, rerank, image generation, transcription, and text-to-speech.

Provider profiles define:

  • provider id
  • protocol family
  • base URL and URL-building rules
  • credential environment variables
  • capabilities
  • provider quirks such as dropped parameters, custom cost calculators, or required headers

Chat Providers

ProviderIDProtocolAuth
OpenAI:openaiopenai-chatOPENAI_API_KEY
OpenRouter:openrouteropenrouterOPENROUTER_API_KEY
Anthropic Messages:anthropicanthropic-messagesANTHROPIC_API_KEY
Anthropic OAuth:anthropicanthropic-messagesCLAUDE_OAT_TOKEN
Gemini Native:gemini-nativegemini-nativeGEMINI_API_KEY
Vertex Gemini:vertex-geminigemini-nativeADC / GOOGLE_OAUTH_ACCESS_TOKEN
OpenAI Codex:codexcodexOPENAI_API_KEY
Codex Backend:codex-backendcodex~/.codex/auth.json
DeepSeek:deepseekopenai-chatDEEPSEEK_API_KEY
Kimi / Moonshot:kimiopenai-chatMOONSHOT_API_KEY
Kimi Code:kimi-codeopenai-chatKIMI_API_KEY
Mistral:mistralopenai-chatMISTRAL_API_KEY
Groq:groqopenai-chatGROQ_API_KEY
Cerebras:cerebrasopenai-chatCEREBRAS_API_KEY
Together:togetheropenai-chatTOGETHER_API_KEY
xAI:xaiopenai-chatXAI_API_KEY
HuggingFace Router:huggingfaceopenai-chatHF_TOKEN
Perplexity:perplexityperplexity-chatPERPLEXITY_API_KEY
AWS Bedrock:bedrockbedrockAWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY
Ollama Native:ollama-nativeollama-nativenone
Fake/Test:fakefakenone

OpenAI-compatible aggregator aliases:

ProviderIDAuth
SambaNova:sambanovaSAMBANOVA_API_KEY
DeepInfra:deepinfraDEEPINFRA_API_KEY
Lambda AI:lambdaLAMBDA_API_KEY
Nebius:nebiusNEBIUS_API_KEY
Hyperbolic:hyperbolicHYPERBOLIC_API_KEY
Novita:novitaNOVITA_API_KEY
FriendliAI:friendliaiFRIENDLI_TOKEN
Featherless:featherlessFEATHERLESS_API_KEY
Cloudflare Workers AI:cloudflareCLOUDFLARE_API_TOKEN
DashScope:dashscopeDASHSCOPE_API_KEY
Volcengine ARK:volcengineARK_API_KEY

clojure-llm-sdk is not a proxy router. Aggregator aliases use one credential each and do not perform pool management, spend routing, cooldowns, or tenant isolation.

Provider implementation namespaces are split by provider family. For example, OpenAI chat is owned by llm.sdk.providers.openai.chat, Anthropic chat by llm.sdk.providers.anthropic.chat, OpenRouter by llm.sdk.providers.openrouter.chat, and Bedrock Converse by llm.sdk.providers.bedrock.converse. The older flat namespaces remain compatibility shims for existing callers.

Non-Chat Providers

Embeddings

ProviderIDWire shapeAuth
OpenAI:openai/embeddingsOPENAI_API_KEY
Mistral:mistral/embeddingsMISTRAL_API_KEY
Together:together/embeddingsTOGETHER_API_KEY
Voyage:voyage/embeddingsVOYAGE_API_KEY
Jina:jina/embeddingsJINA_API_KEY
Cohere:cohere/embedCOHERE_API_KEY
Ollama Native:ollama-native/api/embednone

Moderation

ProviderIDAuth
OpenAI:openaiOPENAI_API_KEY

Rerank

ProviderIDWire shapeAuth
Cohere:cohere/rerankCOHERE_API_KEY
Jina:jina/rerankJINA_API_KEY
Voyage:voyage/rerankVOYAGE_API_KEY

Image Generation

ProviderIDAuth
OpenAI:openaiOPENAI_API_KEY
Vertex Imagen:vertex-imagenADC / GOOGLE_OAUTH_ACCESS_TOKEN
AWS Bedrock Image:bedrockAWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY

Audio Transcription

ProviderIDAuth
OpenAI Whisper:openaiOPENAI_API_KEY
Groq Whisper:groqGROQ_API_KEY

Text-To-Speech

ProviderIDAuth
OpenAI TTS:openaiOPENAI_API_KEY
ElevenLabs:elevenlabsELEVENLABS_API_KEY

Provider Notes

Anthropic OAuth

The Anthropic adapter auto-detects OAuth-style tokens by token prefix and switches from x-api-key to Bearer auth. OAuth mode also adds Claude Code identity headers and preserves thinking block signatures for replay.

Kimi Code

:kimi and :kimi-code are intentionally separate:

  • :kimi targets Moonshot's public API at https://api.moonshot.cn/v1 and reads MOONSHOT_API_KEY.
  • :kimi-code targets https://api.kimi.com/coding/v1, reads KIMI_API_KEY, uses the kimi-for-coding model, and sends KimiCLI-style non-secret identity headers.

Perplexity

Perplexity citations and search results are normalized into :part/type :citation parts. Citation tokens and search query counts surface in :response/usage when the provider reports them.

OpenRouter

OpenRouter supports provider routing options through :request/provider-options, including extra_body.provider, extra_body.plugins, and reasoning configuration.

Azure OpenAI

Azure routes by deployment name in the URL. Register one provider id per deployment with llm.sdk.providers.openai.chat/register-azure-deployment!. The legacy llm.sdk.providers.openai-chat namespace forwards to the same implementation. See provider-configuration.md.

Custom OpenAI-Compatible Providers

Register private OpenAI-compatible endpoints with register-alias!. See provider-configuration.md.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close