For the complete documentation index, see llms.txt. This page is also available as Markdown.

Error Handling (old)

Handle errors gracefully when using Synth API.

HTTP Status Codes

Code
Meaning
Action

200

Success

Process response

400

Bad Request

Check authentication header

401

Unauthorized

Check API key

404

Not Found

Check parameters or data availability

429

Rate Limited

Retry after delay

500

Server Error

Retry later

Error Response Format

Errors return JSON with a message field:

{"message": "Unauthorized"}
{"message": "missing key in request header"}

Some endpoints return a plain string for data errors:

"No prediction available"

Common Errors

Missing Authorization Header — Status: 400
{"message": "missing key in request header"}

Solution: Add the Authorization: Apikey YOUR_API_KEY header.

Invalid API Key — Status: 401

Solution: Verify your API key in the dashboard.

No Data Available — Status: 404

Solution: Check that:

  • Asset is valid (BTC, ETH, SOL, XAU, SPYX, NVDAX)

  • Required parameters are provided

  • For /v2/prediction/latest: miner UIDs are valid

Best Practices

Last updated