Skip to content

Commit b324aac

Browse files
committed
fix: add baseURL for compat endpoint
1 parent f3af6cd commit b324aac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/content/docs/ai-gateway/get-started.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export default {
8989

9090
const client = new OpenAI({
9191
apiKey: unifiedAuth,
92+
baseURL: "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat",
9293
});
9394

9495
// Use different providers by changing the model parameter
@@ -129,4 +130,4 @@ https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/{provider}
129130

130131
- Learn more about [caching](/ai-gateway/features/caching/) for faster requests and cost savings and [rate limiting](/ai-gateway/features/rate-limiting/) to control how your application scales.
131132
- Explore how to specify model or provider [fallbacks, ratelimits, A/B tests](/ai-gateway/features/dynamic-routing/) for resiliency.
132-
- Learn how to use low-cost, open source models on [Workers AI](/ai-gateway/usage/providers/workersai/) - our AI inference service.
133+
- Learn how to use low-cost, open source models on [Workers AI](/ai-gateway/usage/providers/workersai/) - our AI inference service.

0 commit comments

Comments
 (0)