diff --git a/src/content/docs/ai-gateway/configuration/authentication.mdx b/src/content/docs/ai-gateway/configuration/authentication.mdx index c6d942471c6df7..86aaeb50e7dc38 100644 --- a/src/content/docs/ai-gateway/configuration/authentication.mdx +++ b/src/content/docs/ai-gateway/configuration/authentication.mdx @@ -29,7 +29,7 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/openai/chat/ --header 'cf-aig-authorization: Bearer {CF_AIG_TOKEN}' \ --header 'Authorization: Bearer OPENAI_TOKEN' \ --header 'Content-Type: application/json' \ - --data '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "What is Cloudflare?"}]}' + --data '{"model": "gpt-5-mini", "messages": [{"role": "user", "content": "What is Cloudflare?"}]}' ``` Using the OpenAI SDK: diff --git a/src/content/docs/ai-gateway/features/dynamic-routing/usage.mdx b/src/content/docs/ai-gateway/features/dynamic-routing/usage.mdx index 769dd90043391d..aeaea275aa7d51 100644 --- a/src/content/docs/ai-gateway/features/dynamic-routing/usage.mdx +++ b/src/content/docs/ai-gateway/features/dynamic-routing/usage.mdx @@ -49,7 +49,7 @@ curl -X POST https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/comp --header 'cf-aig-authorization: Bearer {CF_AIG_TOKEN}' \ --header 'Content-Type: application/json' \ --data '{ - "model": "dynamic/gemini-2.0-flash", + "model": "dynamic/", "messages": [ { "role": "user", @@ -68,12 +68,12 @@ export interface Env { export default { async fetch(request: Request, env: Env) { - const response = await env.AI.gateway("dfD").run({ + const response = await env.AI.gateway("default").run({ provider: "compat", endpoint: "chat/completion", headers: {}, query: { - model: "dynamic/support", + model: "dynamic/", messages: [ { role: "user", diff --git a/src/content/docs/ai-gateway/get-started.mdx b/src/content/docs/ai-gateway/get-started.mdx index 7ad6f9943f7326..d25fe55da894b7 100644 --- a/src/content/docs/ai-gateway/get-started.mdx +++ b/src/content/docs/ai-gateway/get-started.mdx @@ -66,7 +66,7 @@ const client = new OpenAI({ // Use different providers by changing the model parameter const response = await client.chat.completions.create({ - model: "google-ai-studio/gemini-2.0-flash", // or "openai/gpt-4o", "anthropic/claude-3-haiku" + model: "google-ai-studio/gemini-2.5-flash", // or "openai/gpt-5-mini", "anthropic/claude-sonnet-4-5" messages: [{ role: "user", content: "Hello, world!" }], }); ``` diff --git a/src/content/docs/ai-gateway/usage/chat-completion.mdx b/src/content/docs/ai-gateway/usage/chat-completion.mdx index 4c74c6da7cf119..78f1f8940fec41 100644 --- a/src/content/docs/ai-gateway/usage/chat-completion.mdx +++ b/src/content/docs/ai-gateway/usage/chat-completion.mdx @@ -23,9 +23,9 @@ Switch providers by changing the `model` and `apiKey` parameters. Specify the model using `{provider}/{model}` format. For example: -- `openai/gpt-4o-mini` -- `google-ai-studio/gemini-2.0-flash` -- `anthropic/claude-3-haiku` +- `openai/gpt-5-mini` +- `google-ai-studio/gemini-2.5-flash` +- `anthropic/claude-sonnet-4-5` ## Examples @@ -41,7 +41,7 @@ const client = new OpenAI({ }); const response = await client.chat.completions.create({ - model: "google-ai-studio/gemini-2.0-flash", + model: "google-ai-studio/gemini-2.5-flash", messages: [{ role: "user", content: "What is Cloudflare?" }], }); @@ -55,7 +55,7 @@ curl -X POST https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/comp --header 'Authorization: Bearer {GOOGLE_GENERATIVE_AI_API_KEY}' \ --header 'Content-Type: application/json' \ --data '{ - "model": "google-ai-studio/gemini-2.0-flash", + "model": "google-ai-studio/gemini-2.5-flash", "messages": [ { "role": "user", diff --git a/src/content/docs/ai-gateway/usage/providers/anthropic.mdx b/src/content/docs/ai-gateway/usage/providers/anthropic.mdx index 469deee6cfa704..fa3c9408a67bb6 100644 --- a/src/content/docs/ai-gateway/usage/providers/anthropic.mdx +++ b/src/content/docs/ai-gateway/usage/providers/anthropic.mdx @@ -32,7 +32,7 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/anthropic/v1 --header 'anthropic-version: 2023-06-01' \ --header 'Content-Type: application/json' \ --data '{ - "model": "claude-3-opus-20240229", + "model": "claude-sonnet-4-5", "max_tokens": 1024, "messages": [ {"role": "user", "content": "What is Cloudflare?"} @@ -57,7 +57,7 @@ const anthropic = new Anthropic({ baseURL, }); -const model = "claude-3-opus-20240229"; +const model = "claude-sonnet-4-5"; const messages = [{ role: "user", content: "What is Cloudflare?" }]; const maxTokens = 1024; diff --git a/src/content/docs/ai-gateway/usage/providers/google-ai-studio.mdx b/src/content/docs/ai-gateway/usage/providers/google-ai-studio.mdx index d46fad66db4ceb..a61ac71446789f 100644 --- a/src/content/docs/ai-gateway/usage/providers/google-ai-studio.mdx +++ b/src/content/docs/ai-gateway/usage/providers/google-ai-studio.mdx @@ -35,7 +35,7 @@ So your final URL will come together as: `https://gateway.ai.cloudflare.com/v1/{ ### cURL ```bash title="Example fetch request" -curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_name}/google-ai-studio/v1/models/gemini-1.0-pro:generateContent" \ +curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_name}/google-ai-studio/v1/models/gemini-2.5-flash:generateContent" \ --header 'content-type: application/json' \ --header 'x-goog-api-key: {google_studio_api_key}' \ --data '{ @@ -63,7 +63,7 @@ const gateway_name = ""; const genAI = new GoogleGenerativeAI(api_token); const model = genAI.getGenerativeModel( - { model: "gemini-1.5-flash" }, + { model: "gemini-2.5-flash" }, { baseUrl: `https://gateway.ai.cloudflare.com/v1/${account_id}/${gateway_name}/google-ai-studio`, }, diff --git a/src/content/docs/ai-gateway/usage/providers/openai.mdx b/src/content/docs/ai-gateway/usage/providers/openai.mdx index a4bd9c995ae7e3..720c562a6e382b 100644 --- a/src/content/docs/ai-gateway/usage/providers/openai.mdx +++ b/src/content/docs/ai-gateway/usage/providers/openai.mdx @@ -71,7 +71,7 @@ const openai = new OpenAI({ }); try { - const model = "gpt-3.5-turbo-0613"; + const model = "gpt-5-mini"; const messages = [{ role: "user", content: "What is a neuron?" }]; const maxTokens = 100; const chatCompletion = await openai.chat.completions.create({ diff --git a/src/content/docs/ai-gateway/usage/providers/openrouter.mdx b/src/content/docs/ai-gateway/usage/providers/openrouter.mdx index cf34f819355ccb..8ab1a8f15b896f 100644 --- a/src/content/docs/ai-gateway/usage/providers/openrouter.mdx +++ b/src/content/docs/ai-gateway/usage/providers/openrouter.mdx @@ -33,7 +33,7 @@ curl -X POST https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/open --header 'content-type: application/json' \ --header 'Authorization: Bearer OPENROUTER_TOKEN' \ --data '{ - "model": "openai/gpt-3.5-turbo", + "model": "openai/gpt-5-mini", "messages": [ { "role": "user", @@ -59,7 +59,7 @@ const openai = new OpenAI({ try { const chatCompletion = await openai.chat.completions.create({ - model: "openai/gpt-3.5-turbo", + model: "openai/gpt-5-mini", messages: [{ role: "user", content: "What is Cloudflare?" }], }); diff --git a/src/content/docs/ai-gateway/usage/providers/vertex.mdx b/src/content/docs/ai-gateway/usage/providers/vertex.mdx index 24e7ee01707318..197e0d65e59beb 100644 --- a/src/content/docs/ai-gateway/usage/providers/vertex.mdx +++ b/src/content/docs/ai-gateway/usage/providers/vertex.mdx @@ -38,7 +38,7 @@ Your new base URL will use the data above in this structure: `https://gateway.ai Then you can append the endpoint you want to hit, for example: `/publishers/google/models/{model}:{generative_ai_rest_resource}` -So your final URL will come together as: `https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-1.0-pro-001:generateContent` +So your final URL will come together as: `https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-2.5-flash:generateContent` ## Authenticating with Vertex AI @@ -85,7 +85,7 @@ This option is only supported for the provider-specific endpoint, not for the un ::: ```bash -curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-1.0-pro-001:generateContent" \ +curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-2.5-flash:generateContent" \ -H "Authorization: Bearer ya29.c.b0Aaekm1K..." \ -H 'Content-Type: application/json' \ -d '{ @@ -161,7 +161,7 @@ You can also use the provider-specific endpoint to access the full Vertex AI API ### cURL ```bash title="Example fetch request" -curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-1.0-pro-001:generateContent" \ +curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-2.5-flash:generateContent" \ -H "Authorization: Bearer {vertex_api_key}" \ -H 'Content-Type: application/json' \ -d '{ diff --git a/src/content/docs/ai-gateway/usage/websockets-api/realtime-api.mdx b/src/content/docs/ai-gateway/usage/websockets-api/realtime-api.mdx index 56217fae07e28e..87629732118933 100644 --- a/src/content/docs/ai-gateway/usage/websockets-api/realtime-api.mdx +++ b/src/content/docs/ai-gateway/usage/websockets-api/realtime-api.mdx @@ -68,7 +68,7 @@ ws.on("message", (message) => console.log(message.data)); ws.send( JSON.stringify({ setup: { - model: "models/gemini-2.0-flash-exp", + model: "models/gemini-2.5-flash", generationConfig: { responseModalities: ["TEXT"] }, }, }),