Errors and troubleshooting

Diagnose Removit API errors quickly

This troubleshooting section explains how the Removit asynchronous API reports authentication failures, validation errors, job lookup issues, and temporary infrastructure problems.

Use it to interpret status codes and improve the reliability of your API backend integration and job polling logic.

How errors are grouped

These categories help you decide whether the issue should be retried, corrected in the request payload, or escalated operationally.

Request errors

Malformed JSON, missing parameters, incompatible field combinations, or invalid URL inputs.

Business errors

Authentication failures, missing credits, or job lookup errors that depend on account or workflow state.

Processing and infrastructure errors

Temporary service unavailability or terminal processing failures that may need retries or escalation.

Most frequent errors

These are the errors most integrations should expect and map explicitly in backend logic.

401

Unauthorized

Returned when the API key is absent or invalid. - The request does not send X-API-Key or Authorization: Bearer. - The API key value is invalid or no longer accepted.

{
  "error": "unauthorized",
  "message": "API key invalid"
}
422

Unprocessable Entity

Returned when the request is syntactically valid but fails business validation. - job_id is missing on /status. - mode=params is sent without params. - file_url is invalid. - file and file_url are sent together.

{
  "error": "validation",
  "details": {
    "file": ["You must provide either file_url or file"],
    "mode": ["The value you selected is not a valid choice."]
  }
}
402

Payment Required

Returned when the account does not have enough credits to create the requested job. - The current account balance is insufficient. - The workflow should be retried only after credits are restored.

{
  "error": "insufficient_credits"
}
404

Not Found

Returned when the requested job cannot be found from the provided job_id. - The job_id is wrong or unknown. - The client is polling the wrong environment or account context.

{
  "error": "not_found"
}
503

Service Unavailable

Returned when the service is temporarily unavailable or an upstream dependency is failing. - A temporary infrastructure issue affects job creation or job status retrieval. - The integration should retry with backoff and monitor escalation thresholds.

{
  "error": "credits_service_unavailable"
}

Terminal processing failures

When processing fails definitively, the status payload can include a rejected status and refund information.

Terminal failure example

Rejected job payload

This type of response indicates a terminal failure rather than a pending or retriable state.

{
  "error": "Service unavailable",
  "code": 503,
  "status": "rejected",
  "refund": "done"
}

Meaning of refund states

Refund information helps backend systems decide whether a manual billing review is necessary.

done

The refund was successfully processed.

already_done

The refund had already been processed earlier.

failed

The refund was not confirmed and should be reviewed operationally.

Troubleshooting table

Use this table when the request succeeds technically but the workflow does not move as expected.

SymptomProbable causeRecommended action
status=queued for a long timeBacklog or job not yet persisted in the visible state layer.Continue polling with backoff before escalating.
status=pending_* for a long timeExternal image processing is still running.Review retries, timeout thresholds, and business SLA expectations.
422 background image must be an http/https URLThe file_url value is invalid or not public.Send a public HTTP or HTTPS image URL.
final_url = nullThe job is not finished yet.Keep polling until state=done.

HTTP catalog

This compact catalog helps backend teams map status codes to logging, retry, and escalation rules.

CodeEndpointMeaning
200/statusJob status successfully returned.
202/upload, /statusJob accepted or not yet persisted in the final visible state.
400/uploadInvalid JSON or malformed request body.
401/upload, /statusAuthentication is missing or invalid.
402/uploadInsufficient credits.
404/statusThe requested job was not found.
422/upload, /statusValidation error on payload or query parameters.
500/statusInternal processing error.
502/statusExternal API failure.
503/upload, /statusTemporary service unavailability.