Describe the problem/error/question
try to use http request to use huggingface api (https://router.huggingface.co/hf-inference/models/black-forest-labs/FLUX.1-schnell), and get this error.
What is the error message (if any)?
“400 - “{"error":"\n Accept type \"application/json,text/html,application/xhtml+xml,application/xml,text/;q=0.9, image/;q=0.8, /;q=0.7\" not supported.\n Supported accept types are:\n application/json, application/json; charset=utf-8, text/csv, text/plain, image/png, image/jpeg, image/jpg, image/tiff, image/bmp, image/gif, image/webp, image/x-image, audio/x-flac, audio/flac, audio/mpeg, audio/x-mpeg-3, audio/wave, audio/wav, audio/x-wav, audio/ogg, audio/x-audio, audio/webm, audio/webm;codecs=opus, audio/AMR, audio/amr, audio/AMR-WB, audio/AMR-WB+, audio/m4a, audio/x-m4a\n "}””
Please share your workflow
{
“nodes”: [
{
“parameters”: {
“method”: “POST”,
“url”: “https://router.huggingface.co/hf-inference/models/black-forest-labs/FLUX.1-schnell”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendBody”: true,
“bodyParameters”: {
“parameters”: [
{
“name”: “inputs”,
“value”: “Astronaut riding a horse”
}
]
},
“options”: {}
},
“id”: “a9a3f017-4140-4c4c-a5a2-56abfe39da74”,
“name”: “hugginface inference api”,
“type”: “n8n-nodes-base.httpRequest”,
“position”: [
1060,
240
],
“notesInFlow”: true,
“typeVersion”: 4.2,
“credentials”: {
“httpHeaderAuth”: {
“id”: “Vay4JlcEj6OGa4gF”,
“name”: “Header Auth account”
},
“huggingFaceApi”: {
“id”: “mIzGRGnIoHmsInSi”,
“name”: “HuggingFaceApi account”
},
“httpBearerAuth”: {
“id”: “9i3KfM9hPu8rt1Z4”,
“name”: “Bearer Auth account”
}
},
“onError”: “continueErrorOutput”,
“notes”: " "
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “0235c51fbef4a13fab52a7af4870495ff00ffd39fb02ea7632edf818ac8c962e”
}
}
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)