I am trying to use N8N and Fireworks AI through the OpenAI Chat Model per the suggestion in this post back in Sept 2024.
I copied the N8N workflow example given and substituted my Fireworks API Key, but I get a node error.
I am running N8N locally on my MacPro M2.
According to the API documentation, the endpoint should be differently from what you have setup:
Serverless queries (no deployment needed, not all models supported:
curl https://api.fireworks.ai/inference/v1/chat/completions -H âContent-Type: application/jsonâ -H âAuthorization: Bearer $FIREWORKS_API_KEYâ -d â{âmodelâ: âaccounts/fireworks/models/deepseek-v3p1â,âmessagesâ: [{âroleâ: âuserâ,âcontentâ: âSay hello in Spanishâ}]}â
Deployment API calls (you have to setup a deployment in fireworks prior to your request and use the deployment name in your request):
curl https://api.fireworks.ai/inference/v1/chat/completions -H âContent-Type: application/jsonâ -H âAuthorization: Bearer $FIREWORKS_API_KEYâ -d â{âmodelâ: âaccounts/fireworks/models/gpt-oss-120b#<DEPLOYMENT_NAME>â,âmessagesâ: [{âroleâ: âuserâ,âcontentâ: âExplain quantum computing in simple termsâ}]}â
Pro tip: When creating a HTTP request node in n8n, you can paste a curl command via the âImport cURLâ button
I see what I am doing wrong.
I needed to copy the API key when it is first created and not the one that is in the listing afterward.
2 Likes