Issues converting curl command into http request SceneXplain

Im beyond noob and new. Struggling to get this curl to work in my n8n workflow, wanting to get a picture description as out put from SceneXplain. See Curl below
javascript

python

curl "https://api.scenex.jina.ai/v1/describe" \
  -H "x-api-key: token $YOUR_GENERATED_SECRET" \
  -H "content-type: application/json" \
  --data '{
  "data": [
    {
      "algorithm": "jelly",
      "output_length": "100",
      "languages": [
        "en"
      ],
      "image": "..."
    }
  ]
}'


n8n version 1.75.2

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

additional context. now with the workflow

:warning: you posted your token in your workflow - I removed it.

You’re not actually passing the image data to the API. From their specification, you’ll need to transform it into a string, but I can’t find what they expect. I suspect something like base64 encoding, but you’ll need to dig into their API docs to find the exact specs.

"image": "..."

1 Like

Thanks so much. And for removing the token. I will be more aware going forward.

Appreciate the response. I trialled passing it as base64 too with no luck. But maybe i did it wrong. Ill give it a go again trying to pass at Base64 becuase if the below from the api docs.

data

Required

The batch image to be explained. The data should be a list of image requests, each of which follows the structure below. Depending on your subscription, you can specify up to 128 images in one batch. Free users can only specify up to 8 images in one batch. Details can be found on the billing page.

image

string , Required

Specify the image file to be explained. The image file can be either a URL or a base64-encoded string. It is not required when using Inception

Supported file types:

png

jpg

webp

gif

svg

Example: data:image/png;base64,iVBORw0KGgoAAAANS, https://example.com/image.png

1 Like

Hey @Donni , as Bart pointed out and as per documentation,

The image file can be either a URL or a base64-encoded string.
– https://scenex.jina.ai/api

Thus you need either have the file uploaded with public access to it and provide the URL of that location or base64 encode the image and pass it over to the AI.

For the latter, use Extract From File node with “Move File to Base64 String” operation.