---
title: "Compile Typst to PDF"
method: GET
path: "/v1/typst"
tags: ["Typst to PDF"]
---

# Compile Typst to PDF

`GET /v1/typst`

## Request

- Base URL: `https://api.dharun.dev`
- URL: `https://api.dharun.dev/v1/typst`
- Auth: none declared

Returns the PDF itself, or one page as an image. A mistake in the document returns 422 with Typst's message, line and column.

## Query parameters

- `text` string
- `format` 'pdf' | 'png' | 'svg'
- `page` integer
- `ppi` integer

## Response `200`

Success

## Other responses

- `400`: Error
- `404`: Error
- `429`: Error

---

[API](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data.md) · [All operations](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/llms.txt) · [OpenAPI document](https://skmtc.dev/dharun/apis/india-api-free-open-source-apis-for-indian-data/revisions/ecd8b0ec7863?raw)
