Skip to main content
DimiLinks error responses follow the upstream protocol in use:
  • Endpoints under https://api-direct.dimilinks.com/v1/* (OpenAI-compatible) return the OpenAI-style error wrapper.
  • https://api-direct.dimilinks.com/v1/messages (native Anthropic) returns the native Anthropic format {"type":"error","error":{...}}.
OpenAI style (/v1/* endpoints):
Anthropic style (/v1/messages endpoint):

Common errors

Handling recommendations

  • For 400, show error.message directly so the user can adjust the input.
  • For 401 / 403, ask the user to check the key or model permissions; do not retry silently.
  • For 429, use exponential backoff and reduce concurrency; do not retry immediately at high frequency.
  • For 5xx / 502 / 503, allow retries, but record logs for upstream troubleshooting.
  • Stop polling immediately when a task endpoint returns 404 to avoid wasting requests.
  • If the same application code calls both protocols, add a shared HTTP client abstraction that reads either error.message or error.error.message instead of duplicating compatibility logic in every caller.