Skip to main content
Use the AI SDK’s OpenAI-compatible provider with RedPill.

Configure the provider

Use .chatModel() with an exact model ID. The provider sends that ID without adding a prefix.

Generate text

Stream from a route

app/api/generate/route.ts
Keep the RedPill key on the server. Validate tool arguments and bound multi-step tool loops.

Verification boundary

The base-URL configuration does not verify ACI locally. Node and Bun applications can pass connectAci().fetch to createOpenAICompatible, then audit the retained receipt after generation. See the verified Node and Bun transport.

References