The AI Gateway endpoint for Workers AI with openai-compatible syntax is not working
https://developers.cloudflare.com/ai-gateway/providers/workersai/#openai-compatible-endpoints
I copied the curl from your example, replaced the variables with my account id, ai gateway id, and api key; and I get this error:
{
"code": 7003,
"message": "Could not route to /accounts/xxxxxxxxxxxxxxxxx/v1/chat/completions, perhaps your object identifier is invalid?"
},
{
"code": 7000,
"message": "No route for that URI"
}
The request URL is correct (I replaced the variables):
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/workers-ai/v1/chat/completions
Please let me know how to make that work.
2 Replies