ai() API Provider, model, routing, media, and embedding APIs. java api api/ai packages/java/axir-api.json api ai() API

ai() API

LLM provider, model, media, routing, and embedding APIs.

Most Used

Ax.ai

Create a provider client from a provider name and options.

FieldValue
Kindfunction
Ax conceptai
API sectionAxAI
FormAx.ai(provider, options)
ReturnsAI client/service

Important Options

  • api key
  • model
  • api URL
  • headers
  • transport

Examples

Java
AxAIService client = Ax.ai("openai", Map.of("apiKey", System.getenv("OPENAI_API_KEY")));

Full reference

OpenAICompatibleClient

OpenAI-compatible chat, stream, embedding, audio, and realtime provider boundary.

FieldValue
Kindtype
Ax conceptOpenAICompatibleClient
API sectionAxAI
Formnew OpenAICompatibleClient(options)
Returnsprovider client

Important Options

  • api key
  • model
  • base URL
  • transport

Full reference

OpenAIResponsesClient

OpenAI Responses provider mapping using the same Core-owned request and response contract.

FieldValue
Kindtype
Ax conceptOpenAIResponsesClient
API sectionAxAI
Formnew OpenAIResponsesClient(options)
Returnsprovider client

Important Options

  • api key
  • model
  • audio
  • realtime

Full reference

GoogleGeminiClient

Gemini provider mapping for chat, streaming, media, tools, embeddings, and usage normalization.

FieldValue
Kindtype
Ax conceptGoogleGeminiClient
API sectionAxAI
Formnew GoogleGeminiClient(options)
Returnsprovider client

Important Options

  • api key
  • model
  • embed model

Full reference

AnthropicClient

Anthropic provider mapping for messages, thinking, cache control, streaming, and usage normalization.

FieldValue
Kindtype
Ax conceptAnthropicClient
API sectionAxAI
Formnew AnthropicClient(options)
Returnsprovider client

Important Options

  • api key
  • model
  • thinking
  • cache control

Full reference

AxBalancer

Retry and route requests across multiple provider services while preserving Ax request shape.

FieldValue
Kindtype
Ax conceptAxBalancer
API sectionAxAI
Formnew AxBalancer(services, options)
ReturnsAI service

Important Options

  • services
  • retry policy
  • capability requirements

Full reference

MultiServiceRouter

Choose a service by capability or model routing policy.

FieldValue
Kindtype
Ax conceptMultiServiceRouter
API sectionAxAI
Formnew AxMultiServiceRouter(services)
ReturnsAI service

Important Options

  • services
  • routing

Full reference

ProviderRouter

Route provider requests to registered provider clients.

FieldValue
Kindtype
Ax conceptProviderRouter
API sectionAxAI
Formnew AxProviderRouter(providers, routing, processing)
ReturnsAI service

Important Options

  • providers
  • routing
  • processing

Full reference

Full Reference

Open the full Java reference. This page highlights the ai symbols most relevant to everyday use.

Docs