> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asklethe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel AI SDK

> Use LETHE as a provider with createOpenAI().

LETHE's [Chat Completions](/api-reference/chat-completions) endpoint is OpenAI-compatible, so it works with the AI SDK's OpenAI provider by overriding `baseURL`.

```ts agent.ts theme={null}
import { createOpenAI } from "@ai-sdk/openai";

const lethe = createOpenAI({
  baseURL: "https://asklethe.ai/v1",
  apiKey: process.env.LETHE_API_KEY,
});

const { text } = await generateText({
  model: lethe("lethe"),
  prompt,
});
```

Get `LETHE_API_KEY` from [Authentication](/api-reference/authentication). Swap `"lethe"` for `"lethe-vision"` to send image or video input. See [Models](/api-reference/models).
