Trying to use replicate via Ai Gateway

Trying to use replicate via Ai Gateway with universal endpoint, but can't get it work. Sending the example payload
{
"version": "5fe0a3d7ac2852264a25279d1dfb798acbc4d49711d126646594e212cb821749",
"input": {
"prompt": "What is Cloudflare?"
}
}
{
"version": "5fe0a3d7ac2852264a25279d1dfb798acbc4d49711d126646594e212cb821749",
"input": {
"prompt": "What is Cloudflare?"
}
}
But just get empty error in return. Also empty error in the realtime logs in the dashboard. Api key is there and if I use replicate directly with the same key everything works. Any advice on how to dig further?
1 Reply
sergey
sergeyOP11mo ago
When making a request I send this as a first item in the request body
{
provider: 'replicate',
endpoint: 'predictions',
authorization: `Token ${...}`,
query: {
version:
'5fe0a3d7ac2852264a25279d1dfb798acbc4d49711d126646594e212cb821749',
input: {
prompt: 'What is Cloudflare?',
},
},
},
{
provider: 'replicate',
endpoint: 'predictions',
authorization: `Token ${...}`,
query: {
version:
'5fe0a3d7ac2852264a25279d1dfb798acbc4d49711d126646594e212cb821749',
input: {
prompt: 'What is Cloudflare?',
},
},
},
Want results from more Discord servers?
Add your server