Skip to content

Error Codes

HTTP Status Codes

CodeMeaning
200Success
201Created (POST share)
204No Content (DELETE)
400Request validation error
401Unauthorized
402Insufficient credits — the account balance is below the task cost (1 credit standard, 5 with triplet_analysis)
403Forbidden
404Resource not found
422Invalid request body format
429Rate limit exceeded
500Internal server error

Business Errors (in SSE FAILURE)

These occur inside the state: "FAILURE" event from the status stream.

json
{
  "state": "FAILURE",
  "error": {
    "code": 1001,
    "message": "The analysis could not be completed."
  }
}
CodeNameDescription
1001PAGE_UNAVAILABLEOne of the requested pages was not included in the analysis
1002ANALYSIS_SERVICE_FAILUREInternal analysis service error
1003CRITICAL_OWN_PAGE_FAILUREYour own page returned an error or is unreachable
1004REPORT_GENERATION_FAILUREFailed to compile the analysis report
1005TRIPLET_ANALYSIS_FAILUREKnowledge Graph extraction failed
9999UNKNOWN_ERRORUnexpected error

Handling Errors — Python

python
with requests.get(stream_url, headers=HEADERS, stream=True) as resp:
    for line in resp.iter_lines():
        if not line or not line.startswith(b"data: "):
            continue
        event = json.loads(line[6:])
        if event["state"] == "FAILURE":
            err = event.get("error", {})
            raise RuntimeError(f"[{err.get('code')}] {err.get('message')}")

Validation Errors (422)

json
{
  "detail": [
    {
      "loc": ["body", "competitor_urls"],
      "msg": "ensure this value has at most 20 items",
      "type": "value_error.list.max_items"
    }
  ]
}