Skip to content
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
36affac
Document custom endpoint support in Vercel AI SDK
promptless[bot] Mar 23, 2026
8ada411
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
muhsinking Mar 23, 2026
d09f92c
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 16, 2026
748344e
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 16, 2026
4f3fe5e
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 16, 2026
486ecde
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 29, 2026
b5fc953
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 29, 2026
ce75614
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 29, 2026
653b66e
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] Apr 29, 2026
0b03467
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
8aa07fe
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
37e0c0c
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
3babfc0
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
12e5101
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
1073c2c
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
0651f46
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 1, 2026
f5a5d0d
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 2, 2026
dc4a7d8
Merge branch 'main' into promptless/ai-sdk-custom-endpoints
promptless[bot] May 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions public-endpoints/ai-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,49 @@ const runpod = createRunpod({
| `baseURL` | Base URL for API requests | `https://api.runpod.ai/v2` |
| `headers` | Custom HTTP headers to include with requests | `{}` |

## Using custom endpoints
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: PR #61 fixes createImageModel to use the same fallback pattern as other model types. Changes in src/runpod-provider.ts show the new logic that supports endpoint IDs and Console URLs via parseRunpodConsoleEndpointId.
View source


You can use your own [Serverless endpoints](/serverless/overview) with the AI SDK. This is useful when you've deployed a custom model or want to use a specific endpoint you've created.

### Using endpoint IDs

Pass your Serverless endpoint ID directly as the model identifier:

```typescript
import { runpod } from "@runpod/ai-sdk-provider";
import { generateText, experimental_generateImage as generateImage } from "ai";

// Use a custom chat endpoint
const { text } = await generateText({
model: runpod("your-endpoint-id"),
prompt: "Hello, how are you?",
});

// Use a custom image endpoint
const { image } = await generateImage({
model: runpod.image("your-image-endpoint-id"),
prompt: "A beautiful sunset",
});
```

The SDK resolves your endpoint ID to `https://api.runpod.ai/v2/{endpointId}` automatically.

### Using Console URLs

Copy an endpoint URL directly from the Runpod Console and use it as the model identifier:

```typescript
import { runpod } from "@runpod/ai-sdk-provider";
import { experimental_generateImage as generateImage } from "ai";

const { image } = await generateImage({
model: runpod.image("https://console.runpod.io/serverless/user/endpoint/abc123xyz"),
prompt: "A serene mountain landscape",
});
```

The SDK extracts the endpoint ID from the Console URL and routes requests to your endpoint.

## Text generation

### Basic text generation
Expand Down
Loading