We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a0b3ce commit 69092f7Copy full SHA for 69092f7
src/content/docs/ai-gateway/chat-completion.mdx
@@ -33,8 +33,8 @@ Specify the model using `{provider}/{model}` format. For example:
33
import OpenAI from "openai";
34
const client = new OpenAI({
35
apiKey: "YOUR_PROVIDER_API_KEY", // Provider API key
36
- baseURL:
37
- "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions",
+ // NOTE: the OpenAI client automatically adds /chat/completions to the end of the URL, you should not add it yourself.
+ baseURL: "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat",
38
});
39
40
const response = await client.chat.completions.create({
0 commit comments