ai() API Provider, model, routing, media, and embedding APIs. typescript api api/ai build/apidocs api ai() API

ai() API

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

Most Used

ai

Factory function for creating AI service instances with full type safety.

FieldValue
Kindfunction
Formai
ReturnsAxAI<InferTModelKey<T>> A configured AI service instance ready for chat completions and embeddings
Sourcesource

Call Shape

TypeScript
function ai<T>(options: T): AxAI<InferTModelKey<T>>;

Arguments And Options

NameTypeDescription
optionsTProvider-specific configuration. Must include name to identify the provider.

Examples

TypeScript
const ai = ai({
  name: 'openai',
  apiKey: process.env.OPENAI_API_KEY
});
TypeScript
const ai = ai({
  name: 'anthropic',
  apiKey: process.env.ANTHROPIC_API_KEY,
  config: {
    model: 'claude-sonnet-5',
    maxTokens: 4096
  }
});

Full reference

AxAI

TypeScript class exported by @ax-llm/ax. See the constructor, methods, and full reference below.

FieldValue
Kindclass
FormAxAI
Sourcesource

Call Shape

TypeScript
chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<
  | AxChatResponse
| ReadableStream<AxChatResponse>>;

Full reference

AxAIAnthropic

TypeScript class exported by @ax-llm/ax. See the constructor, methods, and full reference below.

FieldValue
Kindclass
FormAxAIAnthropic
Sourcesource

Call Shape

TypeScript
new AxAIAnthropic<TModelKey>(__namedParameters: Readonly<Omit<AxAIAnthropicArgs<TModelKey>, "name"> & object>): AxAIAnthropic<TModelKey>;

Full reference

AxAIGoogleGemini

TypeScript class exported by @ax-llm/ax. See the constructor, methods, and full reference below.

FieldValue
Kindclass
FormAxAIGoogleGemini
Sourcesource

Call Shape

TypeScript
new AxAIGoogleGemini<TModelKey>(__namedParameters: Readonly<Omit<AxAIGoogleGeminiArgs<TModelKey>, "name">>): AxAIGoogleGemini<TModelKey>;

Full reference

Advanced / internals / full reference

AxAgentStateExecutorModelState

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAgentStateExecutorModelState
Sourcesource

Call Shape

TypeScript
type AxAgentStateExecutorModelState = object;

Full reference

AxAIAnthropicArgs

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicArgs
Sourcesource

Full reference

AxAIAnthropicChatError

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicChatError
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicChatError = object;

Full reference

AxAIAnthropicChatRequest

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicChatRequest
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicChatRequest = object;

Full reference

AxAIAnthropicChatRequestCacheParam

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicChatRequestCacheParam
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicChatRequestCacheParam = object;

Full reference

AxAIAnthropicChatResponse

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicChatResponse
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicChatResponse = object;

Full reference

AxAIAnthropicChatResponseDelta

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicChatResponseDelta
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicChatResponseDelta = 
  | AxAIAnthropicMessageStartEvent
  | AxAIAnthropicContentBlockStartEvent
  | AxAIAnthropicContentBlockDeltaEvent
  | AxAIAnthropicContentBlockStopEvent
  | AxAIAnthropicMessageDeltaEvent
  | AxAIAnthropicMessageStopEvent
  | AxAIAnthropicPingEvent
  | AxAIAnthropicErrorEvent;

Full reference

AxAIAnthropicConfig

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicConfig
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicConfig = AxModelConfig & object;

Full reference

AxAIAnthropicContentBlockDeltaEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicContentBlockDeltaEvent
Sourcesource

Full reference

AxAIAnthropicContentBlockStartEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicContentBlockStartEvent
Sourcesource

Full reference

AxAIAnthropicContentBlockStopEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicContentBlockStopEvent
Sourcesource

Full reference

axAIAnthropicDefaultConfig

TypeScript function exported by @ax-llm/ax. See the call shape, arguments, and full reference below.

FieldValue
Kindfunction
FormaxAIAnthropicDefaultConfig
ReturnsAxAIAnthropicConfig
Sourcesource

Call Shape

TypeScript
function axAIAnthropicDefaultConfig(): AxAIAnthropicConfig;

Full reference

AxAIAnthropicDocumentBlock

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicDocumentBlock
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicDocumentBlock = AxAIAnthropicChatRequestCacheParam & object;

Full reference

AxAIAnthropicEffortLevel

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicEffortLevel
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicEffortLevel = "low" | "medium" | "high" | "xhigh" | "max";

Full reference

AxAIAnthropicEffortLevelMapping

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicEffortLevelMapping
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicEffortLevelMapping = object;

Full reference

AxAIAnthropicErrorEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicErrorEvent
Sourcesource

Full reference

AxAIAnthropicFunctionTool

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicFunctionTool
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicFunctionTool = object & AxAIAnthropicChatRequestCacheParam;

Full reference

AxAIAnthropicMessageDeltaEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicMessageDeltaEvent
Sourcesource

Full reference

AxAIAnthropicMessageStartEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicMessageStartEvent
Sourcesource

Full reference

AxAIAnthropicMessageStopEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicMessageStopEvent
Sourcesource

Full reference

AxAIAnthropicModel

TypeScript enumeration exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindenumeration
FormAxAIAnthropicModel
Sourcesource

Full reference

AxAIAnthropicOutputConfig

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicOutputConfig
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicOutputConfig = object;

Full reference

AxAIAnthropicPingEvent

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIAnthropicPingEvent
Sourcesource

Full reference

AxAIAnthropicRequestTool

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicRequestTool
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicRequestTool = 
  | AxAIAnthropicFunctionTool
  | AxAIAnthropicWebSearchTool;

Full reference

AxAIAnthropicStopDetails

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicStopDetails
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicStopDetails = object;

Full reference

AxAIAnthropicTaskBudget

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicTaskBudget
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicTaskBudget = object;

Full reference

AxAIAnthropicThinkingConfig

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicThinkingConfig
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicThinkingConfig = object;

Full reference

AxAIAnthropicThinkingTokenBudgetLevels

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicThinkingTokenBudgetLevels
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicThinkingTokenBudgetLevels = object;

Full reference

AxAIAnthropicThinkingWire

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicThinkingWire
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicThinkingWire = 
  | {
  budget_tokens: number;
  type: "enabled";
}
  | {
  display?: "summarized" | "omitted";
  type: "adaptive";
}
  | {
  type: "disabled";
}
  | {
  type: "between_tools";
};

Full reference

axAIAnthropicVertexDefaultConfig

TypeScript function exported by @ax-llm/ax. See the call shape, arguments, and full reference below.

FieldValue
Kindfunction
FormaxAIAnthropicVertexDefaultConfig
ReturnsAxAIAnthropicConfig
Sourcesource

Call Shape

TypeScript
function axAIAnthropicVertexDefaultConfig(): AxAIAnthropicConfig;

Full reference

AxAIAnthropicVertexModel

TypeScript enumeration exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindenumeration
FormAxAIAnthropicVertexModel
Sourcesource

Full reference

AxAIAnthropicWebSearchTool

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIAnthropicWebSearchTool
Sourcesource

Call Shape

TypeScript
type AxAIAnthropicWebSearchTool = object;

Full reference

AxAIArgs

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIArgs
Sourcesource

Call Shape

TypeScript
type AxAIArgs<TModelKey> = 
  | AxAIOpenAIArgs<"openai", AxAIOpenAIModel, AxAIOpenAIEmbedModel, TModelKey>
  | AxAIOpenAIResponsesArgs<"openai-responses", AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel, TModelKey>
  | AxAIAnthropicArgs<TModelKey>
  | AxAIGoogleGeminiArgs<TModelKey>
  | AxAIMetaArgs<TModelKey>
  | AxAITypesafeArgs<TModelKey>
  | AxAIOpenAIDecisionsArgs<TModelKey>
  | AxAIGoogleGeminiDecisionsArgs<TModelKey>
  | AxAIDeploymentProfileArgs<TModelKey>
  | AxAIWebLLMArgs<TModelKey>
| AxAIChromeAIArgs<TModelKey>;

Full reference

AxAIChromeAI

AxAIChromeAI: Adapter for Chrome’s built-in AI (Prompt API)

FieldValue
Kindclass
FormAxAIChromeAI
Sourcesource

Call Shape

TypeScript
const chromeAI = ai({ name: 'chrome-ai' });
const gen = ax('question -> answer');
const result = await gen.forward(chromeAI, { question: 'What is 2+2?' });

Full reference

AxAIChromeAIArgs

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIChromeAIArgs
Sourcesource

Full reference

AxAIChromeAIChatRequest

Chrome AI: Synthetic chat request Maps ax’s multi-message format to Chrome AI’s session + prompt model

FieldValue
Kindtypealias
FormAxAIChromeAIChatRequest
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIChatRequest = object;

Full reference

AxAIChromeAIChatResponse

Chrome AI: Synthetic chat response Wraps Chrome AI’s text response into an OpenAI-like structure for ax

FieldValue
Kindtypealias
FormAxAIChromeAIChatResponse
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIChatResponse = object;

Full reference

AxAIChromeAIChatResponseDelta

Chrome AI: Streaming response delta Chrome AI’s promptStreaming() returns successive text chunks.

FieldValue
Kindtypealias
FormAxAIChromeAIChatResponseDelta
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIChatResponseDelta = object;

Full reference

AxAIChromeAIConfig

Chrome AI: Model options for text generation

FieldValue
Kindtypealias
FormAxAIChromeAIConfig
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIConfig = AxModelConfig & object;

Full reference

axAIChromeAICreativeConfig

TypeScript function exported by @ax-llm/ax. See the call shape, arguments, and full reference below.

FieldValue
Kindfunction
FormaxAIChromeAICreativeConfig
ReturnsAxAIChromeAIConfig
Sourcesource

Call Shape

TypeScript
function axAIChromeAICreativeConfig(): AxAIChromeAIConfig;

Full reference

axAIChromeAIDefaultConfig

TypeScript function exported by @ax-llm/ax. See the call shape, arguments, and full reference below.

FieldValue
Kindfunction
FormaxAIChromeAIDefaultConfig
ReturnsAxAIChromeAIConfig
Sourcesource

Call Shape

TypeScript
function axAIChromeAIDefaultConfig(): AxAIChromeAIConfig;

Full reference

AxAIChromeAIEmbedModel

Chrome AI doesn’t support embeddings Placeholders for consistency with the framework

FieldValue
Kindtypealias
FormAxAIChromeAIEmbedModel
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIEmbedModel = never;

Full reference

AxAIChromeAIEmbedRequest

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIChromeAIEmbedRequest
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIEmbedRequest = never;

Full reference

AxAIChromeAIEmbedResponse

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIChromeAIEmbedResponse
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIEmbedResponse = never;

Full reference

AxAIChromeAIImpl

TypeScript class exported by @ax-llm/ax. See the constructor, methods, and full reference below.

FieldValue
Kindclass
FormAxAIChromeAIImpl
Sourcesource

Call Shape

TypeScript
new AxAIChromeAIImpl(config: AxAIChromeAIConfig, languageModel?: ChromeAILanguageModel): AxAIChromeAIImpl;

Full reference

AxAIChromeAIModel

Chrome AI: Model for text generation Chrome ships with Gemini Nano as its built-in AI model

FieldValue
Kindenumeration
FormAxAIChromeAIModel
Sourcesource

Full reference

AxAIChromeAIModelId

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIChromeAIModelId
Sourcesource

Call Shape

TypeScript
type AxAIChromeAIModelId = 
  | AxAIChromeAIModel
  | string & object;

Full reference

AxAICohereEmbedModel

Cohere: Models for use in embeddings

FieldValue
Kindenumeration
FormAxAICohereEmbedModel
Sourcesource

Full reference

AxAICohereModel

Cohere: Models for text generation

FieldValue
Kindenumeration
FormAxAICohereModel
Sourcesource

Full reference

AxAICredentialProvider

Supplies fresh authentication headers immediately before each HTTP attempt.

FieldValue
Kindtypealias
FormAxAICredentialProvider
ReturnsPromise<Record<string, string>>
Sourcesource

Call Shape

TypeScript
type AxAICredentialProvider = (request: AxAICredentialRequest) => Promise<Record<string, string>>;

Arguments And Options

NameTypeDescription
requestAxAICredentialRequest

Full reference

AxAICredentialRequest

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAICredentialRequest
Sourcesource

Call Shape

TypeScript
type AxAICredentialRequest = Readonly<{
  method: string;
  operation:   | "chat"
     | "models"
     | "stream_chat"
     | "embed"
     | "responses"
     | "transcribe"
     | "speak"
     | "realtime";
  profile: string;
  url: string;
}>;

Full reference

AxAIDeepSeekModel

DeepSeek: Models for text generation

FieldValue
Kindenumeration
FormAxAIDeepSeekModel
Sourcesource

Full reference

AxAIDeploymentProfileArgs

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIDeploymentProfileArgs
Sourcesource

Call Shape

TypeScript
type AxAIDeploymentProfileArgs<TModelKey> = Omit<AxAIProfileArgs<TModelKey>, "name"> & object;

Full reference

AxAIDeploymentProfileId

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIDeploymentProfileId
Sourcesource

Call Shape

TypeScript
type AxAIDeploymentProfileId = Exclude<AxAIProfileId, 
  | "openai"
  | "openai-responses"
  | "anthropic"
  | "google-gemini"
  | "webllm"
  | "chrome-ai"
  | "typesafe"
  | "openai-decisions"
  | "google-gemini-decisions"
  | "meta"
  | "meta-chat"
| "meta-messages">;

Full reference

AxAIEmbedModels

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIEmbedModels
Sourcesource

Call Shape

TypeScript
type AxAIEmbedModels = 
  | AxAIOpenAIEmbedModel
  | AxAIGoogleGeminiEmbedModel
  | AxAICohereEmbedModel;

Full reference

AxAIFeatures

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIFeatures
Sourcesource

Full reference

AxAIGoogleGeminiArgs

TypeScript interface exported by @ax-llm/ax. See the fields and full reference below.

FieldValue
Kindinterface
FormAxAIGoogleGeminiArgs
Sourcesource

Full reference

AxAIGoogleGeminiBatchEmbedRequest

AxAIGoogleGeminiEmbedRequest: Structure for making an embedding request to the Google Gemini API.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiBatchEmbedRequest
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiBatchEmbedRequest = object;

Full reference

AxAIGoogleGeminiBatchEmbedResponse

AxAIGoogleGeminiEmbedResponse: Structure for handling responses from the Google Gemini API embedding requests.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiBatchEmbedResponse
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiBatchEmbedResponse = object;

Full reference

AxAIGoogleGeminiCacheCreateRequest

Request to create a context cache in Vertex AI / Gemini API.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiCacheCreateRequest
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiCacheCreateRequest = object;

Full reference

AxAIGoogleGeminiCacheResponse

Response from creating/getting a context cache.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiCacheResponse
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiCacheResponse = object;

Full reference

AxAIGoogleGeminiCacheUpdateRequest

Request to update a context cache (e.g., extend TTL).

FieldValue
Kindtypealias
FormAxAIGoogleGeminiCacheUpdateRequest
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiCacheUpdateRequest = object;

Full reference

AxAIGoogleGeminiChatRequest

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiChatRequest
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiChatRequest = object;

Full reference

AxAIGoogleGeminiChatResponse

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiChatResponse
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiChatResponse = object;

Full reference

AxAIGoogleGeminiChatResponseDelta

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiChatResponseDelta
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiChatResponseDelta = AxAIGoogleGeminiChatResponse;

Full reference

AxAIGoogleGeminiConfig

AxAIGoogleGeminiConfig: Configuration options for Google Gemini API

FieldValue
Kindtypealias
FormAxAIGoogleGeminiConfig
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiConfig = AxModelConfig & object;

Full reference

AxAIGoogleGeminiContent

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiContent
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiContent = object;

Full reference

AxAIGoogleGeminiContentPart

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiContentPart
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiContentPart = object & 
  | {
  text: string;
  thought?: boolean;
}
  | {
  thought: string;
}
  | {
  inlineData: {
     data: string;
     mimeType: string;
  };
}
  | {
  functionCall: {
     args: object;
     id?: string;
     name: string;
  };
}
  | {
  functionResponse: {
     id?: string;
     name: string;
     response: object;
  };
}
  | {
  fileData: {
     fileUri: string;
     mimeType: string;
  };
}
  | {
  audioTranscription: {
     text: string;
  };
}
  | {
  executableCode: object;
}
  | {
  codeExecutionResult: object;
};

Full reference

AxAIGoogleGeminiDecisionAnswer

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionAnswer
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionAnswer<Q> = Q extends object ? object : Q extends object ? object : Q extends object ? object : never;

Full reference

AxAIGoogleGeminiDecisionContent

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionContent
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionContent = 
  | AxAIGoogleGeminiDecisionText
  | AxAIGoogleGeminiDecisionMedia;

Full reference

AxAIGoogleGeminiDecisionInstructions

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionInstructions
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionInstructions = 
  | string
  | AxAIGoogleGeminiDecisionText
  | readonly AxAIGoogleGeminiDecisionText[];

Full reference

AxAIGoogleGeminiDecisionMedia

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionMedia
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionMedia = object & 
  | {
  data: string;
  uri?: never;
}
  | {
  data?: never;
  uri: string;
};

Full reference

AxAIGoogleGeminiDecisionQuestion

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionQuestion
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionQuestion = object & 
  | {
  criteria?: {
     false_description?: string;
     true_description?: string;
  };
  type: "noul";
}
  | {
  criteria: Readonly<Record<string, string>>;
  type: "choice";
}
  | {
  criteria: readonly [string, string, ...string[]];
  type: "score";
};

Full reference

AxAIGoogleGeminiDecisions

Native Google Gemini Decisions transport, with Ax retries, cancellation and usage.

FieldValue
Kindclass
FormAxAIGoogleGeminiDecisions
Sourcesource

Call Shape

TypeScript
new AxAIGoogleGeminiDecisions<TModelKey>(args: Readonly<AxAIGoogleGeminiDecisionsArgs<TModelKey>>): AxAIGoogleGeminiDecisions<TModelKey>;

Full reference

AxAIGoogleGeminiDecisionsArgs

Google Gemini Decisions evaluates typed questions; it does not generate freeform text.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionsArgs
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionsArgs<TModelKey> = object;

Full reference

AxAIGoogleGeminiDecisionsClient

Native Google Gemini Decisions API. Questions and application decision policies belong to the caller.

FieldValue
Kindclass
FormAxAIGoogleGeminiDecisionsClient
Sourcesource

Call Shape

TypeScript
new AxAIGoogleGeminiDecisionsClient(args: Readonly<AxAIGoogleGeminiDecisionsClientArgs>): AxAIGoogleGeminiDecisionsClient;

Full reference

AxAIGoogleGeminiDecisionsClientArgs

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionsClientArgs
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionsClientArgs = object;

Full reference

AxAIGoogleGeminiDecisionsClientOptions

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionsClientOptions
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionsClientOptions = Pick<AxAIServiceOptions, 
  | "fetch"
  | "timeout"
  | "retry"
  | "abortSignal"
  | "corsProxy"
  | "verbose"
| "includeRequestBodyInErrors">;

Full reference

AxAIGoogleGeminiDecisionsModel

TypeScript enumeration exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindenumeration
FormAxAIGoogleGeminiDecisionsModel
Sourcesource

Full reference

AxAIGoogleGeminiDecisionsQuestions

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionsQuestions
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionsQuestions = Readonly<Record<string, AxAIGoogleGeminiDecisionQuestion>>;

Full reference

AxAIGoogleGeminiDecisionsRequest

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionsRequest
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionsRequest<Q> = object;

Full reference

AxAIGoogleGeminiDecisionsResponse

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionsResponse
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionsResponse<Q> = object;

Full reference

AxAIGoogleGeminiDecisionText

TypeScript typealias exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindtypealias
FormAxAIGoogleGeminiDecisionText
Sourcesource

Call Shape

TypeScript
type AxAIGoogleGeminiDecisionText = object;

Full reference

axAIGoogleGeminiDefaultConfig

AxAIGoogleGemini: Default Model options for text generation

FieldValue
Kindfunction
FormaxAIGoogleGeminiDefaultConfig
ReturnsAxAIGoogleGeminiConfig
Sourcesource

Call Shape

TypeScript
function axAIGoogleGeminiDefaultConfig(): AxAIGoogleGeminiConfig;

Full reference

axAIGoogleGeminiDefaultCreativeConfig

TypeScript function exported by @ax-llm/ax. See the call shape, arguments, and full reference below.

FieldValue
Kindfunction
FormaxAIGoogleGeminiDefaultCreativeConfig
ReturnsAxAIGoogleGeminiConfig
Sourcesource

Call Shape

TypeScript
function axAIGoogleGeminiDefaultCreativeConfig(): AxAIGoogleGeminiConfig;

Full reference

AxAIGoogleGeminiEmbedModel

TypeScript enumeration exported by @ax-llm/ax. See the full reference for complete details.

FieldValue
Kindenumeration
FormAxAIGoogleGeminiEmbedModel
Sourcesource

Full reference

Full Reference

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

Docs