API Client🔒 100% local
Compose API requests and copy ready-to-run curl and fetch snippets. Privacy-first, no server uploads, no tracking.
Reads a request written as a method and a URL, with an optional JSON body on the next line, and writes the same call out three ways: as a curl command, as a JavaScript fetch snippet and as a Python requests snippet, followed by notes on timeouts and status codes. It is a text transformer, so no request is sent and no connection is opened.
How to use it
- Type the method and URL on the first line, for example GET https://api.example.com/users. The method can be left off and defaults to GET.
- If the call carries a body, leave a line break and paste the JSON underneath it.
- Press Process, then Copy Output to take the snippets into an editor or a ticket.
Worked example
GET https://api.example.com/usersbecomesGET https://api.example.com/users
Host: api.example.com Path: /users
Body: none
=== curl ===
curl -X GET 'https://api.example.com/users' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ***'This is the opening of the output. The panel then prints the same call as a fetch snippet and a Python requests snippet, and closes with notes about setting a timeout, GET being safe to retry, and the status codes to expect.
POST https://api.example.com/v1/orders
{"sku":"A-1","qty":2}becomesPOST https://api.example.com/v1/orders
Host: api.example.com Path: /v1/orders
Body: 30 chars of JSON
=== curl ===
curl -X POST 'https://api.example.com/v1/orders' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ***' \
-d '{
"sku": "A-1",
"qty": 2
}'Again the first section only. The body is taken from the second line and re-indented with two spaces before it is embedded, and the notes section for POST warns against retrying blindly and suggests sending an Idempotency-Key header.
When to use it
- Someone pastes a request into a chat and you want a fetch snippet with the same headers instead of retyping them.
- Drafting documentation that needs curl, JavaScript and Python versions of one call to agree with each other.
- Sanity-checking the path, the query parameters and the body of a request before you make the live call.
What it does not do
- It never sends anything, so it cannot show a response, a status code or how long the call took.
- The URL must be absolute. A relative path such as /users is refused, and http:// is refused unless the host is localhost or 127.0.0.1, with the message that credentials over http are exposed.
- A POST with no body is accepted and quietly produces a body-less snippet. There is no warning that a write request is probably incomplete.
- Every snippet assumes bearer auth, so a call using an API key header, basic auth or a signed request needs the Authorization line edited by hand.
- Placeholders are flagged rather than resolved: /users/:id is noted as templated and left exactly as typed, and query values are noted as needing encoding instead of being encoded.