thisssss seems like a bug. could you share your account id + gateway name through DM please
thisssss seems like a bug. could you share your account id + gateway name through DM please

https://router.huggingface.co/novita/v3/openai/chat/completions
https://api.openai.com/v1/audio/transcriptions is used instead


-N (nobuffer) flag"stream": true?/chat/completion to the end, so your URL shouldn't have that in it with the SDKhttps://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions which is what is in the docs. But I'll try it without /chat/completions!


https://router.huggingface.co/novita/v3/openai/chat/completions{
"error": {
"message": "The audio file could not be decoded or its format is not supported.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}https://api.openai.com/v1/audio/transcriptionserror: 500 [{"code":2002,"message":"Internal server error"}]
status: 500,
headers: Headers {
"date": "Wed, 04 Jun 2025 00:17:33 GMT",
"content-type": "application/json",
"content-length": "101",
"connection": "keep-alive",
"vary": "Accept-Encoding",
"set-cookie": [ "__cf_bm=lxBSjxIyTfBLOugJfEcUnFQKJkr6p7.457_228mHwaY-1748996253-1.0.1.1-X7FS2Pm_wVKIaxeYigqVUhnTxNN9iz.UjHnzyc1mlSb.XVfZET4Qu.h1ipuCSntWPgT3rlOGusU1gjNJAKHq_SKTPaueVJM6jp6n4pkt.kU; path=/; expires=Wed, 04-Jun-25 00:47:33 GMT; domain=.gateway.ai.cloudflare.com; HttpOnly; Secure; SameSite=None" ],
"server": "cloudflare",
"cf-ray": "94a33f75f8e2000e-ORD",
},
requestID: null,
error: [
[Object ...]
],-N"stream": true/chat/completionhttps://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions/chat/completionsimport OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.GEMINI_API_KEY,
baseURL: "<my gateway url>"
});
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);curl -X POST "<my gateway url>" \
--header "Authorization: Bearer $GEMINI_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "google-ai-studio/gemini-2.0-flash",
"messages": [
{
"role": "user",
"content": "What is Cloudflare?"
}
]
}'