{"version":"2026-11-08","generated_at":"2026-11-17T01:48:57.389Z","title":"ReqRes LLM Guide","intent":"Give LLM agents deterministic instructions to generate code, UIs, and tests against ReqRes.","base_urls":{"production":"https://reqres.in","app":"https://app.reqres.in"},"docs":{"openapi":"/openapi.json","swagger":"/docs","llm_guide":"/llm","marketing":"https://reqres.in"},"demo":{"description":"Public teaching endpoints with fixture data. No authentication required. Perfect for learning HTTP, async patterns, and API consumption.","rate_limits":{"/api/users":"20 requests/minute per IP","/api/*":"100 requests/minute per IP"},"fixture_users":[{"id":1,"email":"george.bluth@reqres.in"},{"id":2,"email":"janet.weaver@reqres.in"},{"id":3,"email":"emma.wong@reqres.in"},{"id":4,"email":"eve.holt@reqres.in"},{"id":5,"email":"charles.morris@reqres.in"},{"id":6,"email":"tracey.ramos@reqres.in"},{"id":7,"email":"michael.lawson@reqres.in"},{"id":8,"email":"lindsay.ferguson@reqres.in"},{"id":9,"email":"tobias.funke@reqres.in"},{"id":10,"email":"byron.fields@reqres.in"},{"id":11,"email":"george.edwards@reqres.in"},{"id":12,"email":"rachel.howell@reqres.in"}],"endpoints":[{"id":"list_users","summary":"List demo users (paginated).","method":"GET","path":"/api/users","query":{"page":"integer >= 1 (default: 1)","per_page":"integer (default: 6)","delay":"integer seconds to delay response (useful for testing async/loading states)"},"success":{"status":200,"example":{"page":1,"per_page":6,"total":12,"total_pages":2,"data":[{"id":1,"email":"george.bluth@reqres.in","first_name":"George","last_name":"Bluth","avatar":"https://reqres.in/img/faces/1-image.jpg"}],"support":{"url":"https://reqres.in/go/playbook","text":"Become a better CTO. A playbook of war stories and practical advice from a two-time startup CTO."}}},"notes":["Use data[] for tables/cards; use total_pages for pagination.","Avatars are absolute URLs.","Add ?delay=3 to simulate slow network."]},{"id":"get_user","summary":"Get single user by ID.","method":"GET","path":"/api/users/:id","success":{"status":200,"example":{"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"...","text":"..."}}},"errors":[{"status":404,"example":{}}],"notes":["Returns empty {} with 404 if ID not found."]},{"id":"create_user","summary":"Create a user (echoed, not persisted).","method":"POST","path":"/api/users","body":{"name":"string","job":"string"},"success":{"status":201,"example":{"name":"morpheus","job":"leader","id":"123","createdAt":"2026-01-01T00:00:00.000Z"}},"notes":["Returns the input plus generated id and createdAt.","Data is NOT persisted - next GET will not show it."]},{"id":"update_user","summary":"Update a user (echoed, not persisted).","method":"PUT or PATCH","path":"/api/users/:id","body":{"name":"string","job":"string"},"success":{"status":200,"example":{"name":"morpheus","job":"zion resident","updatedAt":"2026-01-01T00:00:00.000Z"}}},{"id":"delete_user","summary":"Delete a user.","method":"DELETE","path":"/api/users/:id","success":{"status":204,"example":{}}},{"id":"list_resources","summary":"List color resources (Pantone colors).","method":"GET","path":"/api/unknown","query":{"page":"integer","per_page":"integer"},"success":{"status":200,"example":{"data":[{"id":1,"name":"cerulean","year":2000,"color":"#98B2D1","pantone_value":"15-4020"}]}},"notes":["Alternative resource endpoint demonstrating the same pagination pattern.","12 Pantone Color of the Year entries."]},{"id":"login","summary":"Login with fixture users.","method":"POST","path":"/api/login","body":{"email":"fixture user email","password":"any string"},"success":{"status":200,"example":{"token":"QpwL5tke4Pnpja7X4"}},"errors":[{"status":400,"example":{"error":"Missing password"}},{"status":400,"example":{"error":"user not found"}}],"notes":["ONLY fixture emails work (e.g., eve.holt@reqres.in).","Password is required but any value works.","Token is static per user, not a real JWT."]},{"id":"register","summary":"Register with fixture users.","method":"POST","path":"/api/register","body":{"email":"fixture user email","password":"any string"},"success":{"status":200,"example":{"id":4,"token":"QpwL5tke4Pnpja7X4"}},"errors":[{"status":400,"example":{"error":"Note: Only defined users succeed registration"}},{"status":400,"example":{"error":"Missing password"}}],"notes":["ONLY fixture emails work.","Non-fixture emails return 400 to demonstrate error handling."]}]},"starter_project":{"description":"Every new user gets a seeded project with a \"products\" collection and 3 sample records. Use this to test CRUD immediately after signup.","collection":{"name":"Products","slug":"products","schema":{"name":"string","price":"number","category":"string","in_stock":"boolean"},"sample_records":[{"name":"Wireless Headphones","price":59.99,"category":"Electronics","in_stock":true},{"name":"Leather Notebook","price":24,"category":"Stationery","in_stock":true},{"name":"Cold Brew Coffee Kit","price":38.5,"category":"Food & Drink","in_stock":false}]},"quick_start":["POST https://reqres.in/api/projects/sandbox (no account, no key, no body) returns a project, a manage key (pro_*), a public key (pub_*) and a claim_url. Give the user the claim_url: unclaimed projects are deleted after 72 hours. People can also sign up at https://app.reqres.in (free, no credit card).","GET /api/collections/products/records -H \"x-api-key: YOUR_MANAGE_KEY\"","POST /api/collections/products/records -H \"x-api-key: YOUR_MANAGE_KEY\" with {\"data\":{\"name\":\"Test\",\"price\":5.99,\"category\":\"New\",\"in_stock\":true}}","PATCH /api/collections/products/records/RECORD_ID with {\"data\":{\"in_stock\":false}} merges fields; PUT replaces the whole record.","Changes persist. Fetch again and your new record is there.","Per-user data without email: POST /api/app-users {\"email\":\"alice@example.com\"} (manage key), then POST /api/app-users/USER_ID/sessions/simulate (manage key, no body) returns a 6-hour session_token. Send Authorization: Bearer SESSION_TOKEN to /app/collections/products/records: each user only sees their own records."]},"project":{"description":"Project-scoped endpoints with real persistence. Requires an API key from https://app.reqres.in.","auth":{"api_keys":{"header":"x-api-key","obtain":"https://app.reqres.in/api-keys","types":{"manage_key":{"prefix":"pro_","permissions":["read","write","manage"],"browser_safe":false,"usage":"Server-side CRUD, admin operations, CI/CD"},"public_key":{"prefix":"pub_","permissions":["read"],"browser_safe":true,"usage":"Browser reads, start magic link login"}},"scope":"x-project-id header or project_id query param (optional, defaults to key owner project)"},"session_tokens":{"header":"Authorization: Bearer <session_token>","obtain":"POST /api/app-users/verify after magic link flow","usage":"App user endpoints under /app/*","expiry":"24 hours"}},"endpoints":[{"id":"custom_endpoints","summary":"Project-defined custom JSON responses.","method":"ANY","path":"/api/custom/{path}","auth":"x-api-key (public for GET, manage for writes)","notes":["Define responses in the dashboard at /custom-endpoints.","Supports all HTTP methods.","Returns X-RateLimit-* headers."]},{"id":"collections_list","summary":"List records in a collection.","method":"GET","path":"/api/collections/{slug}/records","auth":"x-api-key","query":{"page":"integer (default: 1)","limit":"integer (default: 50, max: 100)","search":"string (searches data fields)","order":"asc | desc","created_before":"ISO8601 datetime","created_after":"ISO8601 datetime"},"success":{"status":200,"example":{"data":[{"id":"rec_abc123","data":{"title":"Example","completed":false},"created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-01T00:00:00Z"}],"meta":{"page":1,"limit":50,"total":100,"pages":2}}}},{"id":"collections_get","summary":"Get single record.","method":"GET","path":"/api/collections/:slug/records/:id","auth":"x-api-key","success":{"status":200,"example":{"data":{"id":"rec_abc123","data":{"title":"Example"},"created_at":"...","updated_at":"..."}}},"errors":[{"status":404,"example":{"error":"not_found","message":"..."}}]},{"id":"collections_create","summary":"Create a record.","method":"POST","path":"/api/collections/{slug}/records","auth":"x-api-key (manage)","body":{"data":"{ ...fields matching collection schema }"},"success":{"status":201,"example":{"data":{"id":"rec_new123","data":{"title":"New item"},"created_at":"...","updated_at":"..."}}},"errors":[{"status":400,"example":{"error":"validation_error","message":"..."}},{"status":403,"example":{"error":"records_limit_reached","message":"...","limit":1000,"current":1000,"upgrade_url":"https://app.reqres.in/upgrade"}}]},{"id":"collections_update","summary":"Update a record. PATCH merges the sent fields and keeps the rest; PUT replaces the record data.","method":"PUT or PATCH","path":"/api/collections/:slug/records/:id","auth":"x-api-key (manage)","body":{"data":"{ ...fields }"},"success":{"status":200,"example":{"data":{"id":"...","data":{},"updated_at":"..."}}}},{"id":"collections_delete","summary":"Delete a record.","method":"DELETE","path":"/api/collections/:slug/records/:id","auth":"x-api-key (manage)","success":{"status":204}}]},"app_users":{"description":"End-user authentication via magic links. App users have scoped access to their own records.","flow":["1. POST /api/app-users/login with email → sends magic code to email","2. POST /api/app-users/verify with token → returns session_token","3. Use Authorization: Bearer <session_token> for /app/* endpoints"],"endpoints":[{"id":"app_user_login","summary":"Start magic link login flow.","method":"POST","path":"/api/app-users/login","auth":"x-api-key (public recommended)","body":{"email":"string","project_id":"optional if key is project-scoped"},"success":{"status":200,"example":{"data":{"sent":true,"expires_in_minutes":15,"message":"Magic code sent to email"}}},"notes":["Rate limited: 1 request per 2 minutes per email.","To test without an inbox, create the user with POST /api/app-users and mint a session with POST /api/app-users/{id}/sessions/simulate (manage key)."]},{"id":"app_user_verify","summary":"Exchange magic token for session.","method":"POST","path":"/api/app-users/verify","auth":"none (the emailed code identifies the project); safe to call from the browser","body":{"token":"8-digit code from email"},"success":{"status":200,"example":{"data":{"session_token":"hex_string...","expires_at":"2026-02-09T12:00:00Z","email":"user@example.com"}}}},{"id":"app_user_me","summary":"Get current app user info.","method":"GET","path":"/app/me","auth":"Authorization: Bearer <session_token>","success":{"status":200,"example":{"data":{"id":"uuid","email":"user@example.com","status":"active"}}}},{"id":"app_collections","summary":"CRUD on user-scoped records.","method":"GET, POST, PUT, PATCH, DELETE","path":"/app/collections/:slug/records[/{id}]","auth":"Authorization: Bearer <session_token>","notes":["Records are automatically scoped to the logged-in app user.","App users cannot see or modify other users' records."]}]},"plans":{"free":{"price":"$0/mo","requests_per_day":250,"collections":3,"records":100,"app_users":10,"custom_endpoints":0,"log_retention_days":1},"lite":{"price":"$5/mo","requests_per_day":10000,"collections":3,"records":100,"app_users":10,"custom_endpoints":0,"log_retention_days":1},"dev":{"price":"$12/mo","requests_per_day":20000,"collections":5,"records":5000,"app_users":200,"custom_endpoints":10,"log_retention_days":7},"pro":{"price":"$29/mo","requests_per_day":50000,"collections":20,"records":50000,"app_users":1000,"custom_endpoints":100,"log_retention_days":30},"agent_developer":{"price":"$49/mo","requests_per_day":333333,"requests_per_month":10000000,"note":"Designed for AI coding agents. Includes all Dev features plus Agent Sandbox endpoints (/agent/v1/*)."},"note":"Free tier requires no credit card. Limits reset at midnight UTC."},"agent_sandbox":{"description":"Endpoints designed for AI coding agents to practice against. Richer data shapes than the demo API: cursor pagination, deeply nested resources, deliberate error scenarios, deterministic seeded fixtures.","base_path":"/agent/v1","auth":"Free tier is open with no header - 100 requests/day per IP. To raise the cap, subscribe to Agent Developer ($49/mo) and send the issued key as x-agent-id (format: agt_<64 hex>, provisioned at app.reqres.in/agents). Arbitrary strings in the header are rejected with 401.","conventions":{"ids":"ULID format with type prefix (usr_, ord_, prd_, adr_, etc.). 26 chars after prefix.","timestamps":"ISO 8601 with millisecond precision, always UTC (.000Z suffix).","money":"Object: {amount: integer_in_smallest_currency_unit, currency: \"ISO4217\", formatted: \"human\"}.","cursors":"Opaque and nonce-free (deterministic for a given seed and world version). Pass back unchanged.","cache":"Data endpoints: max-age=60, s-maxage=300. Scenario endpoints: no-store.","request_id":"X-Request-ID header on every response. Include in support requests.","sandbox_signal":"X-Agent-Sandbox-Intentional header on /scenarios/* signals deliberate failures (suppress error reporters)."},"endpoints":[{"id":"agent_health","summary":"Health probe with rate-limit status. Cheap to call repeatedly.","method":"GET","path":"/agent/v1/health","success":{"status":200,"example":{"data":{"status":"healthy","version":"v1.0.0","uptime_seconds":12345,"rate_limit_status":{"tier":"free","remaining_today":null,"limit_today":null,"reset_at":null},"deprecations":[]}}}},{"id":"agent_users_list","summary":"Paginated user list with cursor pagination.","method":"GET","path":"/agent/v1/users","query":{"cursor":"opaque cursor from previous response, omit for first page","limit":"integer 1-100 (default 20, silently clamped)","fields":"comma-separated sparse fieldset (e.g. id,email)","seed":"integer for deterministic fixtures (default 42)"},"success":{"status":200,"example":{"data":[],"meta":{"limit":20,"returned":20,"next_cursor":"...","prev_cursor":null,"has_more":true,"total_estimate":247}}},"notes":["Use meta.next_cursor for next page; do not increment a page number.","Verify meta.returned matches limit (silent clamping at 100)."]},{"id":"agent_user_get","summary":"Single user with optional expansion of nested resources.","method":"GET","path":"/agent/v1/users/:id","query":{"expand":"comma-separated: addresses,activity,organizations"},"notes":["Without expand, nested resources return as references {id, object_type}.","activity items have heterogeneous shapes by type (login vs profile_updated).","Invalid ID format returns 400, not 404."]},{"id":"agent_login","summary":"Auth flow with realistic shape variation (MFA branch).","method":"POST","path":"/agent/v1/auth/login","body":{"email":"string","password":"string >= 8 chars"},"notes":["Use email containing \"+mfa@\" to trigger the MFA challenge response shape.","Use \"+wrong@\" or \"+locked@\" to trigger 401 branches.","Returns next_step hypermedia hint pointing to follow-up endpoint when MFA required."]},{"id":"agent_orders_list","summary":"Orders with relational data (customer, line items, products).","method":"GET","path":"/agent/v1/orders","query":{"cursor":"opaque cursor","limit":"integer 1-100","status":"pending|paid|shipped|delivered|refunded|cancelled","seed":"integer"},"notes":["Money is always {amount, currency, formatted} - amount in smallest currency unit (cents for USD).","Some line_items reference deleted products: product.deleted_at set, product.name and product.price are null.","unit_price in line_items may differ from current product.price (historical immutability)."]},{"id":"agent_scenarios_list","summary":"List available training scenarios.","method":"GET","path":"/agent/v1/scenarios"},{"id":"agent_scenarios_get","summary":"Trigger a deliberate failure mode for testing error handling.","method":"GET","path":"/agent/v1/scenarios/:scenario","notes":["Available: rate-limited, server-error, bad-gateway, timeout, validation-error, unauthorized, forbidden, not-found, conflict, too-large, slow, partial-content, redirect-loop, malformed-json, empty-response.","All non-2xx responses include header X-Agent-Sandbox-Intentional: <scenario> for error-reporter filtering.","timeout and slow return immediately with X-Agent-Sandbox-Simulated-Delay header (no real connection blocking)."]}]},"errors":{"common":[{"status":400,"code":"validation_error","causes":["Invalid JSON","Schema mismatch","Missing required fields"]},{"status":401,"code":"unauthorized","causes":["Missing API key","Invalid API key","Expired session token"]},{"status":403,"code":"*_limit_reached","causes":["Plan limits exceeded"],"note":"Response includes limit, current, and upgrade_url fields."},{"status":404,"code":"not_found","causes":["Record does not exist","Collection does not exist"]},{"status":429,"code":"rate_limited","causes":["Too many requests"],"note":"Check Retry-After header for wait time in seconds."}],"shape":{"error":"error_code (string)","message":"Human-readable message (string)","hint":"Actionable suggestion (optional string)","limit":"Plan limit (optional number)","current":"Current usage (optional number)","upgrade_url":"URL to upgrade (optional string)"}},"guardrails":["Always send JSON bodies with Content-Type: application/json on POST/PUT/PATCH.","Check response.ok before parsing JSON; handle error responses gracefully.","Respect rate limits; implement exponential backoff on 429 with Retry-After header.","Use fixture emails (e.g., eve.holt@reqres.in) for demo /api/login and /api/register.","Do not invent emails for demo auth - only fixture emails return tokens.","Avatars in responses are absolute URLs; use them directly in <img> tags.","Demo endpoints echo data but do not persist - use /api/collections/* for real storage.","POST and PUT to /api/collections/* require body wrapped in {\"data\": {...fields}}. Omitting the \"data\" wrapper returns 400.","Do not scrape HTML pages; use JSON endpoints only.","A public key (pub_*) can read the owner's records in every collection, whatever its visibility, and never sees records created by app users. A collection's visibility setting only controls whether classroom students can read it.","When unsure, fetch /openapi.json or /llm for the current API contract."],"samples":{"demo_list_users":"curl \"https://reqres.in/api/users?page=1\"","demo_list_with_delay":"curl \"https://reqres.in/api/users?page=1&delay=3\"","demo_get_user":"curl \"https://reqres.in/api/users/2\"","demo_create_user":"curl -X POST https://reqres.in/api/users -H 'Content-Type: application/json' -d '{\"name\":\"morpheus\",\"job\":\"leader\"}'","demo_login":"curl -X POST https://reqres.in/api/login -H 'Content-Type: application/json' -d '{\"email\":\"eve.holt@reqres.in\",\"password\":\"cityslicka\"}'","project_list_records":"curl 'https://reqres.in/api/collections/products/records?page=1' -H 'x-api-key: YOUR_API_KEY'","project_create_record":"curl -X POST https://reqres.in/api/collections/products/records -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{\"data\":{\"name\":\"New Product\",\"price\":9.99,\"category\":\"Test\",\"in_stock\":true}}'","app_user_login":"curl -X POST https://reqres.in/api/app-users/login -H 'x-api-key: YOUR_PUBLIC_KEY' -H 'Content-Type: application/json' -d '{\"email\":\"USER_EMAIL\"}'"},"flows":[{"id":"ui_user_directory","title":"Build a paginated user list","steps":["GET /api/users?page=1 → render data[] in table/cards","Show total_pages for pagination controls","On row click, GET /api/users/:id for detail view","Handle 404 by showing \"User not found\""]},{"id":"ui_crud_forms","title":"Build create/update forms","steps":["POST /api/users with {name, job} → show createdAt on success","PUT/PATCH /api/users/:id on edit → show updatedAt","Handle 400 by showing validation errors"]},{"id":"ui_auth_flow","title":"Implement demo login","steps":["GET /api/users to populate email dropdown with fixture emails","POST /api/login with {email, password} → store token on success","Show friendly error for 400 responses (missing password, user not found)"]},{"id":"project_crud","title":"Build real CRUD with persistence","steps":["Get API key from https://app.reqres.in/api-keys","Include x-api-key header on all requests","GET /api/collections/{slug}/records for list","POST with {data: {...}} for create","PUT/PATCH /api/collections/:slug/records/:id for update","DELETE for remove","Handle 403 plan limits by showing upgrade prompt"]},{"id":"app_user_auth","title":"Implement app user magic link auth","steps":["POST /api/app-users/login with {email} using public key","User receives 8-digit code via email","POST /api/app-users/verify with {token} → get session_token","Store session_token securely (not localStorage in production)","Use Authorization: Bearer <token> for /app/* endpoints","Handle 401 by redirecting to login"]}],"example_apps":[{"name":"Task Manager","tags":"Auth + Scoped CRUD","live_url":"https://demo.reqres.in","source_url":"https://github.com/benhowdle89/reqres-demo-app","demonstrates":["App-user magic code login","Session-based auth (Bearer token)","Scoped record access per user","Full CRUD with pagination"]},{"name":"Waitlist App","tags":"Public Signup + Admin Dashboard","live_url":"https://reqres-waitlist-demo.reqres.workers.dev","source_url":"https://github.com/benhowdle89/reqres-waitlist-demo","demonstrates":["API key auth for public writes (project key)","Magic code admin login (App Users)","Search and filter queries (data_contains, search)","Duplicate detection before record creation","Record status updates (PUT with full data merge)"]}]}