Skip to main content
Use Auriko as your LLM provider in the Vercel AI SDK with a first-party provider package. This integration is for TypeScript and JavaScript. For Python, use the LangChain or LlamaIndex integration.
@auriko/ai-sdk-provider is at 0.2.0. Expect API changes before 1.0.

Prerequisites

Install

Use the provider

Create a provider instance and pass it to any AI SDK function:
createAuriko() reads your AURIKO_API_KEY environment variable by default.

Stream responses

Use streamText for streaming:

Configure options

createAuriko() accepts these parameters:
ParameterTypeDefaultDescription
apiKeystringAURIKO_API_KEY envAPI key
baseURLstring"https://api.auriko.ai/v1"API base URL
headersRecord<string, string>undefinedCustom headers
fetchtypeof fetchglobalThis.fetchCustom fetch implementation
routingRoutingOptionsundefinedDefault routing configuration
metadataAurikoMetadataParamundefinedRequest metadata (tags, user ID, trace ID)

Configure routing

Set routing defaults when you create the provider:
For routing parameters, see the routing options guide and advanced routing guide.

Access routing metadata

For non-streaming calls, read result.providerMetadata?.auriko:
For streaming calls, await the metadata:
Import AurikoResponseMetadata from @auriko/ai-sdk-provider for type-safe access.

Configure manually

You can point the OpenAI-compatible provider at Auriko’s API:
This approach doesn’t include built-in routing or response metadata. You can set a routing strategy with a suffix shortcut (e.g., openai.chat("gpt-4o:cost-focus")). For routing configuration and typed metadata, use @auriko/ai-sdk-provider.