Neural Inverse is Open Source →
DocsCustom Headers Invalid

Error parsing custom headers

Error

Error parsing OpenAI-Compatible headers: <value> is not a valid JSON.

Why this happens

The custom headers field in your OpenAI-Compatible provider settings contains invalid JSON.

Fix

  1. Open Neural Inverse settings → OpenAI-Compatible provider
  2. Find the custom headers field
  3. Enter valid JSON:

Correct:

{"X-Custom-Header": "value", "Authorization": "Bearer sk-xxx"}

Wrong:

X-Custom-Header: value
{X-Custom-Header: "value"}

Common mistakes

  • Missing quotes around keys: {key: "value"}{"key": "value"}
  • Trailing comma: {"key": "value",}{"key": "value"}
  • Single quotes: {'key': 'value'}{"key": "value"}
  • Putting the model name in the headers field instead of the model field

If you don't need custom headers

Leave the field empty — it's optional. Most providers only need the API key and endpoint.


Was this page helpful?

Last edited