hey did you ever get openai compat

hey did you ever get openai compat endpoint working? I'm egtting an error
13 Replies
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
rob
robOP6mo ago
i keep getting this eror but no idea why ?
curl --request POST \
--url https://api.cloudflare.com/client/v4/accounts/[AccountID]/ai/v1/chat/completions \
--header "Authorization: Bearer [APIKey]" \
--header 'Content-Type: application/json' \
--data '
{
"model": "@cf/meta/llama-3-8b-instruct",
"messages": [
{
"role": "user",
"content": "how to build a wooden spoon in 3 short steps? give as short as answer as possible"
}
]
}
'
curl --request POST \
--url https://api.cloudflare.com/client/v4/accounts/[AccountID]/ai/v1/chat/completions \
--header "Authorization: Bearer [APIKey]" \
--header 'Content-Type: application/json' \
--data '
{
"model": "@cf/meta/llama-3-8b-instruct",
"messages": [
{
"role": "user",
"content": "how to build a wooden spoon in 3 short steps? give as short as answer as possible"
}
]
}
'
just using the example from the website no route for that URI
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
rob
robOP6mo ago
Im using the account ID from my cloudflare URL
rob
robOP6mo ago
No description
rob
robOP6mo ago
this one right?
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
rob
robOP6mo ago
where? ohh lemme see o i mnot its on a new Cf account so idc about the key ill delete it agter the 'f' is there
{"success":false,"errors":[{"code":7003,"message":"Could not route to \/accounts\/32567f60fbbfb9a19754e5bfdf8bfe9f\/ai\/v1\/chat\/completions, perhaps your object identifier is invalid?"},{"code":7000,"message":"No route for that URI"}],"messages":[],"result":null}% ➜ w
{"success":false,"errors":[{"code":7003,"message":"Could not route to \/accounts\/32567f60fbbfb9a19754e5bfdf8bfe9f\/ai\/v1\/chat\/completions, perhaps your object identifier is invalid?"},{"code":7000,"message":"No route for that URI"}],"messages":[],"result":null}% ➜ w
same thing even with the 'f' there
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
rob
robOP6mo ago
i have. workersAI endpoint works fine as you can see here So i'm so confuised why the other endpoint does't work-- makes zero sense
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
rob
robOP6mo ago
yeah just wanted another set of eyes on it to rule out me being an idiot i spoke to someone on the worker AI team theyre looking int oit. thanks again for ur time!
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server