AI Gateway - AI Gateway adds OpenAI compatible endpoint
1y ago
Source
CloudflareAI Gateway - AI Gateway adds OpenAI compatible endpointcloudflare.comUsers can now use an OpenAI Compatible endpoint in AI Gateway to easily switch between providers, while keeping the exact same request and response formats. We're launching now with the chat completions endpoint, with the embeddings endpoint coming up next. To get started, use the OpenAI compatible chat completions endpoint URL with your own account id and gateway id and switch between providers by changing the model and apiKey parameters. import OpenAI from "openai" ; const client = new OpenAI ( { apiKey : "YOUR_PROVIDER_API_KEY" , // Provider API key baseURL : " , } ) ; const response = await client . chat . completions . create ( { model : "google-ai-studio/gemini-2.0-flash" , messages : [ { role : "user" , content : "What is Cloudflare?" } ] , } ) ; console . log ( response . choices [ 0 ] . message . content ) ; Additionally, the OpenAI Compatible endpoint can be combined with our Universal Endpoint to add fallbacks across multiple providers. That means AI Gateway will return every response in the same standardized format, no extra parsing logic required! Learn more in the OpenAI Compatibility documentation.
You might also wanna read

Google and OpenAI Compete with AI Shopping Features: Gemini Partners with Gap, ChatGPT Updates Interface
Google and OpenAI are competing in AI-powered shopping features, with Google partnering with Gap Inc to enable purchases through Gemini AI a

Google Expands Free Gemini AI Integration in Chrome Browser
Google is expanding its Gemini AI integration into Chrome browser, making it free for users and rolling out to Mac and Windows users in the
GenAI API for Apple Shortcuts: Cloudflare Worker Integration with OpenAI
A TypeScript API built with Hono and OpenAI, deployed as a Cloudflare Worker, that enables developers to integrate generative AI capabilitie
GitHub - QuantumNous/new-api: A unified AI model hub for aggregation & distribution. It supports cross-converting various LLMs into OpenAI-compatible, Claude-compatible, or Gemini-compatible formats. A centralized gateway for personal and enterprise model
Cloudflare Evolves AI Gateway into Unified Inference Layer for AI Agents
Cloudflare is evolving its AI Gateway into a unified inference layer for AI agents, allowing developers to access models from 14+ providers
MakeHub.ai: OpenAI-Compatible API for LLM Provider Arbitrage and Optimization
MakeHub.ai offers an OpenAI-compatible API endpoint that automatically routes requests to the cheapest and fastest LLM provider for each mod

Comments
Sign in to join the conversation.
No comments yet. Be the first.