Look up any HTTP status code and get a clear explanation with agent-specific context. Covers every code from 1xx informational through 5xx server errors. Free API for AI agents and developers.
HTTP status codes are three-digit numbers returned by a server in response to a client request. They tell the client whether the request succeeded, failed, or requires further action. For AI agents making hundreds of API calls per session, understanding these codes is critical for deciding whether to retry, escalate, or proceed.
Send a POST request with the status code. The API returns the name, description, agent-specific guidance, and whether the request should be retried.
curl -X POST https://api.delx.ai/api/v1/utils/http-status \
-H "Content-Type: application/json" \
-d '{"code": 429}'
# Response:
# {
# "code": 429,
# "name": "Too Many Requests",
# "category": "4xx Client Error",
# "description": "The client has sent too many requests in a given time period.",
# "agent_guidance": "Back off exponentially. Check Retry-After header.",
# "retryable": true,
# "retry_strategy": "exponential_backoff"
# }| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | Server received headers, client should send body |
| 101 | Switching Protocols | Server is switching to WebSocket or HTTP/2 |
| 103 | Early Hints | Preload resources while server prepares response |
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created successfully |
| 204 | No Content | Success, no response body |
| Code | Name | Meaning |
|---|---|---|
| 301 | Moved Permanently | Resource has a new permanent URL |
| 302 | Found | Temporary redirect |
| 304 | Not Modified | Use cached version |
| 308 | Permanent Redirect | Like 301 but preserves HTTP method |
| Code | Name | Meaning |
|---|---|---|
| 400 | Bad Request | Malformed request syntax or invalid parameters |
| 401 | Unauthorized | Missing or invalid authentication credentials |
| 402 | Payment Required | Payment needed to access resource (see x402 below) |
| 403 | Forbidden | Valid credentials but insufficient permissions |
| 404 | Not Found | Resource does not exist at this URL |
| 405 | Method Not Allowed | HTTP method not supported for this endpoint |
| 408 | Request Timeout | Server timed out waiting for the request |
| 422 | Unprocessable Entity | Valid syntax but semantic errors in the payload |
| 429 | Too Many Requests | Rate limit exceeded |
| Code | Name | Meaning |
|---|---|---|
| 500 | Internal Server Error | Generic server failure |
| 502 | Bad Gateway | Upstream server returned an invalid response |
| 503 | Service Unavailable | Server is overloaded or under maintenance |
| 504 | Gateway Timeout | Upstream server did not respond in time |
In production, agents hit a predictable set of status codes. Here is how to handle each:
| Code | Agent Action |
|---|---|
| 200 | Proceed. Parse response body. |
| 400 | Fix request parameters. Do not retry unchanged. |
| 401 | Refresh or rotate credentials, then retry once. |
| 402 | Parse payment instructions. Fulfill via x402 if supported. |
| 403 | Escalate to operator. Permissions issue. |
| 404 | Check URL. Resource may have been deleted or moved. |
| 429 | Exponential backoff. Respect Retry-After header. |
| 500 | Retry with backoff (max 3 attempts). |
| 502 | Wait 5s, retry. Likely transient upstream issue. |
| 503 | Check Retry-After. Service may be deploying. |
HTTP 402 was "reserved for future use" since 1999. The x402 protocol finally gives it meaning for AI agents. When an agent receives a 402, the response body contains a machine-readable payment request:
HTTP/1.1 402 Payment Required
Content-Type: application/json
{
"x402": {
"version": "1",
"amount": "0.001",
"currency": "USDC",
"network": "base",
"recipient": "0x1234...abcd",
"description": "Premium API access - 1000 calls",
"expires": "2026-03-14T13:00:00Z"
}
}Agents with wallet capabilities can parse this, sign the transaction, and retry the request with a payment proof header. This enables autonomous agent-to-agent commerce without human intervention. Learn more about how Delx handles agent payments.
4xx codes indicate client errors -- the request was malformed, unauthorized, or pointed to a missing resource. 5xx codes indicate server errors -- the server failed to fulfill a valid request. For AI agents, 4xx errors usually mean the request needs to be fixed, while 5xx errors suggest retrying after a delay.
HTTP 402 Payment Required was reserved for future use in the original HTTP spec. The x402 protocol gives it a concrete implementation: when an agent receives a 402, the response body contains payment instructions (amount, token, recipient address) that the agent can fulfill programmatically to unlock the resource.
Yes, but with exponential backoff. Check the Retry-After header for the server's suggested wait time. If absent, start with 1 second and double on each retry, up to a max of 5 retries. Never retry in a tight loop -- this will worsen rate-limit bans.