API CALL ERROR Help

Hello I’m having trouble pulling off this api call. Can anyone point out what I am inputting wrong?





Hi @adalouser500,

In your -H Header for the name add Authorization and for the value add Token and then add a space and add the token. ( You can add the token from magic text too like you did already. )

Then in the content-type Header for the name add Content-Type and for the value add application/json. And then try again!

Thank you

I gave it a shot and unfortunately got another error code the header “Authorization” name wasn’t recognized

Is it possible to share a screenshot of that Authorization Header?

You just have to add a query parameter for the authorization header so you put the api token twice once the query parameter and once in the header

Hey I use the replicate API. Replace your Token and keep formatting as I have. I am using the Image Upscale Prediciton, so you can replace the JSON / Magic Text with the machine you wish you use.

As far as I can see your Headers are not formatted correctly. Type exactly as per my image but replace it with your token. Make sure it is Token(Space)(Your Token)

See my settings below:

1 Like

I was able to return a response but my new dilemma is having the image actually load onto the page. The api calls are running a prediction and I can see it coming through in replicate as well as when I run the test request but I’m not getting the return data I need in order to see the image. I set up a GET prediction call and got some reason it’s not showing up.

You can get the results in various ways. I opted to make an external collection. Do a little reading in the help forums and Docs it may be what you need in your scenario.

Otherwise you can make and individual custom action call/Get with the ID, and pull the output URL and display it on the next screen. Both of these work and I have tested.

Find out what works for you :blush:

Thanks for your help!

Thanks for this information @iAppsNi! Appreciated! :muscle:

@adalouser500 check this out! : Replicate - Prediction API.mp4 - Google Drive ( API - stability-ai/stable-diffusion – Run with an API on Replicate )

You’ve gone above and beyond and I really appreciate that!

1 Like

Your welcome!

Does the problem solved for you?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.