# N-up PDF API

Put 2, 4, 6, 8, 9 or 16 pages on each sheet, or lay pages out as a booklet.

`POST /v1/pdf/n-up`

**Price:** 1 credit per 100 pages (started). **Takes:** pdf. **Makes:** pdf.

The same as a one-step [job](https://fynepdf.com/developers/docs/jobs) with the action `n_up`, which can be chained with other steps.

## Request

```bash title="curl"
curl -X POST https://api.fynepdf.com/v1/pdf/n-up \
  -H "Authorization: Bearer $FYNEPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","n":2}'
```

```js title="Node"
import FynePDF from "fynepdf";

const fyne = new FynePDF(); // reads FYNEPDF_API_KEY
const job = await fyne.pdf.nUp({
  file_id: "file_01jc8x4m2k9q7r3t5vwy6z",
  n: 2
});
```

```python title="Python"
from fynepdf import FynePDF

fyne = FynePDF()  # reads FYNEPDF_API_KEY
job = fyne.pdf.n_up(
    file_id="file_01jc8x4m2k9q7r3t5vwy6z",
    n=2,
)
```

## Body

| Parameter | Type | Required | What it does |
|---|---|---|---|
| `file_id` | string |  | The input file. |
| `file_ids` | array of string |  | Input files, for actions that take several (merge, image_to_pdf). |
| `wait` | integer |  | Seconds to wait for the result (default 30). |
| `webhook_url` | string |  |  |
| `metadata` | object |  | Your own keys and values, returned on the job and in webhooks. |
| `n` | integer | yes |  |
| `booklet` | boolean |  |  |

## Response

A **job**: `200` when it finished within `wait` (30 seconds by default), `202` if it is still running; then [poll it or use a webhook](https://fynepdf.com/developers/docs/jobs). The receipt says what each step did and cost, and `outputs` holds the result with a download link (good for an hour; the file is kept 24 hours).

```json
{
  "object": "job",
  "id": "job_01jc9a2b3c4d5e6f7g8h9j",
  "status": "succeeded",
  "mode": "live",
  "inputs": [
    "file_01jc8x4m2k9q7r3t5vwy6z"
  ],
  "steps": [
    {
      "action": "n_up",
      "params": {
        "n": 2
      }
    }
  ],
  "receipt": {
    "steps": [
      {
        "step": 1,
        "action": "n_up",
        "status": "succeeded",
        "credits": 1,
        "pages_before": 14,
        "pages_after": 14,
        "bytes_before": 8700000,
        "bytes_after": 4600000,
        "duration_ms": 4200
      }
    ],
    "credits": 1,
    "credits_quoted": 1,
    "duration_ms": 4300
  },
  "outputs": [
    {
      "object": "file",
      "id": "file_01jc9b7c8d9e0f1g2h3j4k",
      "filename": "result.pdf",
      "kind": "pdf",
      "bytes": 4600000,
      "pages": 14,
      "download_url": "https://files.fynepdf.com/…",
      "expires_at": "2026-11-02T10:30:00.000Z"
    }
  ],
  "error": null
}
```

## Errors

Errors are [problem details](https://fynepdf.com/developers/docs/errors) (RFC 9457) with a `code` you can branch on and a `request_id` for support.


---

Open this page in a browser: https://fynepdf.com/developers/docs/api/n-up

More: [All tools](https://fynepdf.com/tools) · [AI agents](https://fynepdf.com/ai/agents) · [llms.txt](https://fynepdf.com/llms.txt) · [Sitemap](https://fynepdf.com/sitemap.xml)
