# cURL Command Builder API

> For the complete documentation index, see [llms.txt](/llms.txt).

Assemble a shell-safe curl command from method, URL, query parameters, headers, body, and auth, in multi-line, one-line, CMD, or PowerShell style.

Use this endpoint to add the tool to your app, site, workflow, or agent without rebuilding formulas, validation, examples, and docs.

- Slug: `curl-command-builder`
- Category: `developer`
- Version: `2026-04-22`
- Credits per successful call: 1
- Starts on: free
- Max payload: 524288 bytes
- Privacy mode: `no_body_logs`
- Available on: free, starter, pro, business, scale
- Browser tool: https://miniwebtool.com/curl-command-builder/

## Endpoint

`POST https://api.miniwebtool.com/v1/tools/curl-command-builder/run`

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `method` | `str` | no | GET | POST | PUT | PATCH | DELETE | HEAD | OPTIONS Choices: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
| `url` | `str` | no | request URL |
| `query_params` | `str` | no | query parameters, one key=value per line |
| `headers` | `str` | no | headers, one 'Name: value' per line |
| `body_type` | `str` | no | json | none | form | multipart | raw | xml Choices: json, none, form, multipart, raw, xml |
| `body_content` | `str` | no | request body (key=value lines for form/multipart) |
| `auth_type` | `str` | no | bearer | none | basic | apikey_header | apikey_query Choices: bearer, none, basic, apikey_header, apikey_query |
| `auth_user` | `str` | no | username for basic auth |
| `auth_password` | `str` | no | password for basic auth |
| `auth_token` | `str` | no | token for bearer auth |
| `auth_key_name` | `str` | no | API key header or query parameter name |
| `auth_key_value` | `str` | no | API key value |
| `output_style` | `str` | no | multiline | oneline | windows | powershell Choices: multiline, oneline, windows, powershell |
| `quote_style` | `str` | no | single | double Choices: single, double |
| `follow_redirects` | `str` | no | yes | no Choices: yes, no |
| `insecure` | `str` | no | no | yes Choices: no, yes |
| `compressed` | `str` | no | yes | no Choices: yes, no |
| `silent` | `str` | no | no | yes Choices: no, yes |
| `include_headers` | `str` | no | no | yes Choices: no, yes |
| `timeout` | `int | None` | no | --max-time in seconds |
| `user_agent` | `str` | no | User-Agent header value |
| `cookies` | `str` | no | cookies, one key=value per line |

## Example request

```json
{
  "method": "POST",
  "url": "https://api.example.com/v1/users",
  "headers": "Accept: application/json",
  "body_type": "json",
  "body_content": "{\"name\": \"Ada\"}",
  "auth_type": "bearer",
  "auth_token": "TOKEN123"
}
```

## cURL

```bash
curl -X POST https://api.miniwebtool.com/v1/tools/curl-command-builder/run \
  -H 'Authorization: Bearer mwt_live_YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"method":"POST","url":"https://api.example.com/v1/users","headers":"Accept: application/json","body_type":"json","body_content":"{\"name\": \"Ada\"}","auth_type":"bearer","auth_token":"TOKEN123"}'
```

## Response envelope

```json
{
  "request_id": "01K...",
  "tool": "curl-command-builder",
  "tool_version": "2026-04-22",
  "credits_used": 1,
  "result": {}
}
```

## Errors

Errors are RFC 7807 `application/problem+json`. Branch on `code`, not `title`.

## MCP

Agents can discover and call this tool through `https://api.miniwebtool.com/mcp` or `https://api.miniwebtool.com/v1/mcp` using MCP `tools/list` and `tools/call`.

## Frequently asked

### What does the cURL Command Builder API do?

Assemble a shell-safe curl command from method, URL, query parameters, headers, body, and auth, in multi-line, one-line, CMD, or PowerShell style. Use it to add this utility without rebuilding formulas, validation, examples, and documentation.

### How much does one call cost?

1 credit per successful call. Failed calls do not bill.

### What parameters are required?

Required fields: (none). Full schema at `https://api.miniwebtool.com/v1/openapi.json`.

### Is this deterministic?

Yes. Same input, same output. Tool version: 2026-04-22.
