canonical: https://jentic.com/apis/httpbin.org/httpbin

# httpbin.org

httpbin.org is a free, public HTTP request and response service used to test, debug, and demonstrate HTTP clients, proxies, and middleware. Endpoints echo request data, simulate status codes, exercise common authentication schemes, set and read cookies, return delays and streaming responses, and serve common encodings such as gzip, deflate, brotli, and base64. It is the standard reference target for verifying HTTP behaviour in CI pipelines, agent tool tests, and SDK integration suites.

## For AI agents

Exercise and verify HTTP client behaviour against 73 well-known test endpoints covering methods, status codes, auth, cookies, redirects, and encodings.

## Scope

Does not host real applications, persist data between requests, or handle production traffic - use for HTTP client and middleware testing only.

## Capabilities

- Echo back request method, headers, query string, and body via /get, /post, /put, /patch, /delete, and /anything
- Return any HTTP status code on demand to test client error handling and retries
- Exercise basic, bearer, digest, and hidden basic-auth flows for client credential testing
- Set, read, and delete cookies through the /cookies family of endpoints
- Stream delayed and chunked responses to test client timeouts and back-pressure handling
- Serve gzip, deflate, brotli, and base64 encoded payloads to verify decompression in clients

## Use cases

### HTTP Client Conformance Testing

Verify that an HTTP client library or SDK correctly handles methods, headers, query parameters, status codes, and bodies by directing tests at httpbin endpoints. /anything echoes the full request shape, while `/status/{codes}` returns arbitrary status codes for error-path coverage. The service is free, public, and stable enough for CI use.

Example prompt: Send a POST to /anything with a JSON body and assert the response echoes the same headers and body fields.

### Retry and Timeout Logic Validation

Validate retry policies and timeout behaviour by hitting `/status/{codes}` with codes like 500, 502, and 429, or `/delay/{delay}` to simulate slow responses. This produces deterministic, reproducible failure modes so retry middleware can be tuned with confidence.

Example prompt: GET `/delay/5` with a 2-second client timeout and confirm the client raises a timeout error.

### Authentication Scheme Demos

Demonstrate and test how a client handles HTTP basic, bearer, and digest authentication. `/basic-auth/{user}/{passwd}` and /bearer return 401 unless valid credentials are supplied, making them ideal targets for credential-handling tests in agent frameworks.

Example prompt: GET `/basic-auth/user/pass` with the matching credentials and confirm a 200 response with the authenticated payload.

### Agent Tool Smoke Tests via Jentic

When validating that a Jentic-mediated tool call actually reaches the target server, point the agent at httpbin and inspect the echoed request. This isolates network and tool-execution issues from real-API behaviour during agent development.

Example prompt: Search Jentic for echo an http request, load /anything on httpbin, and execute with custom headers to confirm the agent sent them correctly.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/get` | Echo the GET request including headers and query |
| POST | `/anything` | Echo any HTTP request method and body |
| GET | `/status/{codes}` | Return the requested HTTP status code |
| GET | `/delay/{delay}` | Delay the response by N seconds |
| GET | `/basic-auth/{user}/{passwd}` | Challenge with HTTP basic auth |
| GET | `/cookies` | Return current request cookies |
| GET | `/gzip` | Return a gzip-encoded response |

## Key resources

- **Echo** — Endpoints that echo back the request: /get, /post, /anything, /headers
- **Status Codes** — Return arbitrary HTTP status codes for error-path testing
- **Auth** — Basic, bearer, digest, and hidden auth challenge endpoints
- **Cookies** — Set, read, and delete cookies
- **Encoding** — gzip, deflate, brotli, base64, and utf8 response variants

## Why Jentic

- **Setup:** Wiring httpbin by hand means standing up a client against its httpbin.org host and handling each test endpoint yourself. Through Jentic you install once, import httpbin.org from the API Directory, and your agent calls it, with no credential to configure since the service is unauthenticated.
- **Permission scoping:** httpbin exposes stateless test endpoints, so scope your agent to the operations it needs, such as echoing a request or returning a given status code. You choose which calls are in the allowed set, so anything beyond the test endpoints you pick is excluded.
- **Credential handling:** httpbin.org is unauthenticated, so your Jentic One instance injects no credential at execution time and none enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'echo an HTTP request' or 'test a 500 error', and Jentic returns the matching httpbin operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Mockaroo** — Generates realistic fake data and mock REST endpoints rather than echoing requests
- **LambdaTest** — Cloud-based cross-browser and end-to-end test platform for richer integration testing
- **Sentry** — Capture and triage real client errors that surface during httpbin-driven tests

## FAQ

### What authentication does httpbin require?

httpbin.org has no authentication on its own - it is a public service. Some endpoints like /basic-auth and /bearer return 401 unless you supply credentials, but those credentials are echoed for testing only and not validated against any account.

### Can I use httpbin to test retry logic for AI agents?

Yes. Hit `/status/{codes}` with values like 429, 500, or 503 to trigger deterministic failures, and `/delay/{delay}` for slow responses. Together these cover the most common retry and circuit-breaker test paths.

### What are the rate limits for httpbin.org?

httpbin.org is a public service with no documented per-key limits. For high-volume testing, run kennethreitz/httpbin locally with docker run -p 80:80 kennethreitz/httpbin to avoid rate-limit risk and shared-instance variance.

### How do I use httpbin through Jentic to debug an agent?

Search Jentic for echo an http request, load the /anything operation on httpbin, and execute. The response shows exactly which headers, query parameters, and body the agent sent - useful for diagnosing tool-call construction bugs.

### Does httpbin support testing compressed responses?

Yes. /gzip, /deflate, and /brotli return responses encoded with the named compression so the client's decompression handling can be verified end-to-end.

### Is httpbin free to use?

Yes. httpbin.org is free and open-source. The same service can also be self-hosted via the kennethreitz/httpbin Docker image for fully isolated CI usage.

### Can I limit what my agent is allowed to do with the httpbin API?

Yes. Because you run Jentic One yourself, you decide which httpbin operations land in your agent's allowed set, whether that is echoing a request through /anything, returning a given code via `/status/{codes}`, or delaying a response with `/delay/{delay}.` Anything outside the test endpoints you pick stays out of reach, so the agent cannot call operations you did not approve. Since httpbin is unauthenticated, no credential is ever injected or exposed to the agent.
