Delx
Home / Tools / HTTP Status Code Lookup

HTTP Status Code Lookup

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.

What Are HTTP Status Codes?

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.

How to Use the Lookup

Send a POST request with the status code. The API returns the name, description, agent-specific guidance, and whether the request should be retried.

REST API (curl)

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"
# }

Complete Status Code Reference

1xx Informational

CodeNameMeaning
100ContinueServer received headers, client should send body
101Switching ProtocolsServer is switching to WebSocket or HTTP/2
103Early HintsPreload resources while server prepares response

2xx Success

CodeNameMeaning
200OKRequest succeeded
201CreatedResource created successfully
204No ContentSuccess, no response body

3xx Redirection

CodeNameMeaning
301Moved PermanentlyResource has a new permanent URL
302FoundTemporary redirect
304Not ModifiedUse cached version
308Permanent RedirectLike 301 but preserves HTTP method

4xx Client Error

CodeNameMeaning
400Bad RequestMalformed request syntax or invalid parameters
401UnauthorizedMissing or invalid authentication credentials
402Payment RequiredPayment needed to access resource (see x402 below)
403ForbiddenValid credentials but insufficient permissions
404Not FoundResource does not exist at this URL
405Method Not AllowedHTTP method not supported for this endpoint
408Request TimeoutServer timed out waiting for the request
422Unprocessable EntityValid syntax but semantic errors in the payload
429Too Many RequestsRate limit exceeded

5xx Server Error

CodeNameMeaning
500Internal Server ErrorGeneric server failure
502Bad GatewayUpstream server returned an invalid response
503Service UnavailableServer is overloaded or under maintenance
504Gateway TimeoutUpstream server did not respond in time

Codes AI Agents Encounter Most

In production, agents hit a predictable set of status codes. Here is how to handle each:

CodeAgent Action
200Proceed. Parse response body.
400Fix request parameters. Do not retry unchanged.
401Refresh or rotate credentials, then retry once.
402Parse payment instructions. Fulfill via x402 if supported.
403Escalate to operator. Permissions issue.
404Check URL. Resource may have been deleted or moved.
429Exponential backoff. Respect Retry-After header.
500Retry with backoff (max 3 attempts).
502Wait 5s, retry. Likely transient upstream issue.
503Check Retry-After. Service may be deploying.

How Agents Should Handle Each Category

The Special Case: HTTP 402 and x402

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.

FAQ

What is the difference between 4xx and 5xx status codes?

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.

What is HTTP 402 and how does it relate to x402?

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.

Should AI agents automatically retry on 429 Too Many Requests?

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.

Related Articles