Lookup index for the public API surface. Rust is the source of truth; TypeScript declarations in
bindings/node/src/types/are generated by ts-rs and mirror the JSON shapes that flow through the FFI boundary (all bindings use the same shapes). Full provider list: providers.md.
| Type | Rust source | TS declaration | Notes |
|---|---|---|---|
GenerateTextOptions |
generate.rs | GenerateTextOptions.ts | per-call text options (temperature, tools, reasoning, timeout, …) |
CallOptions |
options.rs | CallOptions.ts | base options for all modalities |
TimeoutConfiguration |
options.rs | TimeoutConfiguration.ts | total_ms / step_ms / first_chunk_ms / chunk_ms |
ResponseFormat |
options.rs | ResponseFormat.ts | text / json_object / json_schema |
ReasoningEffort |
types.rs | ReasoningEffort.ts | 7 levels, passed through verbatim |
AbortSignal |
abort_signal.rs | — (runtime handle) | Rust: options field; Node: AbortBridge + JS AbortSignal |
aimux_providers::provider::ProviderOptions (binding compatibility) |
provider.rs | ProviderConfig (per binding) |
base_url / headers / organization / project / params (a max_retries or body_overrides key is rejected as InvalidArgument) |
Output |
output.rs | Output.ts | the output option: Text / Object / Array / Choice / Json |
GenerateTextResult |
generate.rs | GenerateTextResult.ts | steps, text, content, tool_calls, usage, finish_reason, output, … |
StepResult |
step_result.rs | StepResult.ts | one model call: content, usage, performance, request, response |
StreamTextResult |
generate.rs | — | use TextStreamPart while iterating; consume() gives a GenerateTextResult |
TextStreamPart |
stream_part.rs | TextStreamPart.ts | Start / StartStep / TextDelta / ToolCall / FinishStep / Finish / … |
StreamPart |
stream_part.rs | StreamPart.ts | the provider-level stream (LanguageModel::do_stream) |
LanguageModelUsage |
types.rs | LanguageModelUsage.ts | call-level usage: flat input/output/total tokens plus details |
Usage / TokenUsage |
types.rs | Usage.ts | provider-level usage |
FinishReason / FinishReasonUnified |
types.rs | FinishReason.ts | |
Warning |
types.rs | Warning.ts | non-fatal provider notices |
AiMuxError |
error.rs | AiMuxError.ts | typed error with error_type + status_code |
ModelMessage / Role / MessageContent / ModelPrompt |
message.rs | ModelMessage.ts | chat message shapes |
LanguageModelPromptMessage |
language_model_message.rs | LanguageModelPromptMessage.ts | canonical prompt message |
ContentPart |
content.rs | ContentPart.ts | Text / Reasoning / ToolResult / … |
Tool / FunctionTool / ProviderTool |
tool.rs | Tool.ts | tool definitions |
ToolCall / ToolResult / ToolChoice |
tool.rs | ToolCall.ts | tool invocation plumbing |
| Embedding types | embedding_model.rs | Embedding*.ts |
EmbeddingCallOptions / EmbeddingResult / EmbeddingResponse |
| Image types | image_model.rs | Image*.ts |
ImageCallOptions / ImageResult / ImageResponse / ImageFile |
| Speech types | speech_model.rs | Speech*.ts |
SpeechCallOptions / SpeechResult / AudioData |
| Transcription types | transcription_model.rs | Transcription*.ts |
TranscriptionCallOptions / TranscriptionResult / TranscriptionSegment |
| Video types | video_model.rs | Video*.ts |
VideoCallOptions / VideoResult / VideoData |
| Reranking types | reranking_model.rs | Reranking*.ts |
RerankingCallOptions / RerankingResult / RerankingRank |
| Search types | search_model.rs | Search*.ts |
SearchCallOptions / SearchResult / SearchResultItem |
| Files types | files_model.rs | UploadFile*.ts |
UploadFileCallOptions / UploadFileResult |
| Shared | shared.rs | FileBytes.ts / FileData.ts / Size.ts / AspectRatio.ts |
| Provider | Rust | Node / Python | Go / Java | Kotlin / Swift / Flutter | C ABI |
|---|---|---|---|---|---|
| OpenAI | create_openai(OpenAIProviderSettings { api_key: Some(key.into()), ..Default::default() }) |
openai(apiKey, model, baseUrl?) |
NewOpenAI(...) / Model.openai(...) |
Model.openai(...) / Aimux.openai(apiKey:modelId:) |
aimux_openai_new |
| Anthropic | create_anthropic(AnthropicProviderSettings { api_key: Some(key.into()), ..Default::default() }) |
anthropic(apiKey, model, baseUrl?) |
NewAnthropic(...) / Model.anthropic(...) |
Model.anthropic(...) / Aimux.anthropic(apiKey:modelId:) |
aimux_anthropic_new |
GoogleProvider |
google(apiKey, model, baseUrl?) |
— | — | — | |
| DeepSeek | aimux_providers::deepseek::create_deepseek(DeepSeekProviderSettings::default()) |
deepseek(...) |
NewDeepSeek(...) / Model.deepseek(...) |
— | aimux_provider_new("deepseek", ...) |
| Cohere | CohereProvider |
cohere(apiKey, model, baseUrl?) |
NewCohere(...) / Model.cohere(...) |
Model.cohere(...) / Aimux.cohere(...) |
aimux_cohere_new |
| Mistral | MistralProvider |
mistral(apiKey, model, baseUrl?) |
NewMistral(...) / Model.mistral(...) |
Model.mistral(...) / Aimux.mistral(...) |
aimux_mistral_new |
| xAI | XAIProvider |
xai(apiKey, model, baseUrl?) |
NewXai(...) / Model.xai(...) |
Model.xai(...) / Aimux.xai(...) |
aimux_xai_new |
| Bedrock | AmazonBedrockProvider |
bedrock(accessKeyId, secretKey, region, model, baseUrl?) |
NewBedrock(...) / Model.bedrock(...) |
Model.bedrock(...) / Aimux.bedrock(...) |
aimux_bedrock_new |
| Vertex | VertexProvider |
vertex(accessToken, project, location, model, baseUrl?) |
NewVertex(...) / Model.vertex(...) |
Model.vertex(...) / Aimux.vertex(...) |
aimux_vertex_new |
| Anthropic-AWS | AnthropicAwsProvider |
anthropicAws(apiKey, region, model, baseUrl?) |
NewAnthropicAws(...) / Model.anthropicAws(...) |
Model.anthropicAws(...) / Aimux.anthropicAws(...) |
aimux_anthropic_aws_new |
| Azure | AzureOpenAIProvider |
azure(apiKey, resource, deployment, apiVersion?, baseUrl?) |
NewAzure(...) / Model.azure(...) |
Model.azure(...) / Aimux.azure(...) |
aimux_azure_new |
— = not exposed in that binding yet (Google is Rust / Node / Python only).
Every constructor has a base-URL variant (WithBase / baseUrl overload).
Other vendor packages (speech, transcription, image, video and search) have
typed Rust factories; presets use create_provider(name, PresetSettings):
providers.md. Their per-binding modality factories are in the
function tables below.
| Function | Signature (abridged) | Notes |
|---|---|---|
create_provider |
(name, PresetSettings) -> Result<Arc<dyn Provider>, AiMuxError> |
vendor package or preset; unknown name → NoSuchProvider; keys read per request |
default_providers |
() -> BTreeMap<String, Arc<dyn Provider>> |
all built-in providers with default settings |
provider_names |
() -> Vec<&'static str> |
sorted names accepted by create_provider |
provider_registry::create_provider_registry |
(providers, options) -> ProviderRegistry |
resolves "provider:model" ids; options set the separator |
Provider::discovery |
() -> Option<&dyn ProviderDiscovery> |
optional model listing via list_models().await |
generate_text |
(model, prompt, options) -> GenerateTextResult |
non-streaming |
stream_text |
(model, prompt, options) -> StreamTextResult |
streaming |
Per-modality entry points are trait methods on the model types
(EmbeddingModel, ImageModel, SpeechModel, …) — see
API.md §Features.
The bindings keep their own compatibility API, implemented in
aimux_providers::provider; these helpers and option types are not Rust
crate-root exports.
| Function | Notes |
|---|---|
generateText(model, prompt, options?, signal?) / streamText(...) |
typed wrappers; signal = AbortSignal |
openai() / anthropic() / deepseek() / google() |
native typed path; deepseek() uses the vendor chat model |
provider(name, apiKey?, modelId, config?) |
by-name vendor packages and presets; names listed in providers.md |
openaiEmbedding / cohereEmbedding / googleEmbedding |
embeddings |
openaiSpeech / openaiTranscription |
speech / STT |
openaiImage / googleImage / googleVideo |
image / video |
openaiFiles / cohereReranking / tavilySearch |
files / rerank / search |
AbortBridge |
wraps a JS AbortSignal for the raw napi API |
| Function | Notes |
|---|---|
generate_text(model, prompt, options?) / stream_text(...) |
typed wrappers |
openai / anthropic / deepseek / provider |
same semantics as Node; deepseek uses the vendor chat model |
openai_embedding / cohere_embedding / google_embedding |
embeddings |
openai_speech / openai_transcription |
speech / STT |
openai_image / google_image / google_video |
image / video |
openai_files / cohere_reranking / tavily_search |
files / rerank / search |
| Function | Notes |
|---|---|
Provider(name, apiKey?, modelId, config?) |
by-name vendor packages and presets; names listed in providers.md |
NewOpenAI / NewAnthropic / NewDeepSeek |
native typed path (+ WithBase variants) |
NewOpenAIEmbedding / NewCohereEmbedding / NewGoogleEmbedding |
embeddings |
NewOpenAISpeech / NewOpenAITranscription |
speech / STT |
NewOpenAIImage / NewGoogleImage / NewGoogleVideo |
image / video |
NewOpenAIFiles / NewCohereReranking / NewTavilySearch |
files / rerank / search |
| Function | Notes |
|---|---|
provider(name, apiKey?, modelId, config?) |
by-name vendor packages and presets |
openai(apiKey, modelId) / anthropic(apiKey, modelId) |
native typed path (+ WithBase/baseUrl variants; Swift: Aimux.openai(apiKey:modelId:)) |
| modality classes | EmbeddingModel / SpeechModel / ImageModel / TranscriptionModel / VideoModel / RerankingModel / SearchModel / Files, each with openai / cohere / google … factories |
All functions communicate via JSON strings. Entry points are declared in
aimux-ffi.h: provider_new (by-name vendor package or preset),
model constructors (openai_new, anthropic_new, …), *_generate,
*_stream (push-callback), *_embed / *_speech / … per modality, and the
*_free family.
The complete list — registry-backed (name / display / env var / base URL)
and typed-factory providers grouped by category, with the canonical
counts — is in
providers.md. It is generated from
aimux-providers/src/provider_registry.json + aimux-providers/src/lib.rs:
python scripts/gen_providers_doc.py.