Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
format
enum<string>

Output Format

Available options:
json,
yaml,
esm,
cjs,
pkg
printWidth
number

printWidth

Required range: 20 <= x <= 200
tabWidth
number

tabWidth

Required range: 1 <= x <= 16
useTabs
boolean

useTabs — indent with tabs instead of spaces

semi
boolean

semi — print semicolons at end of statements

singleQuote
boolean

singleQuote — use single quotes instead of double

quoteProps
enum<string>

quoteProps

Available options:
as-needed,
consistent,
preserve
trailingComma
enum<string>

trailingComma

Available options:
all,
es5,
none
bracketSpacing
boolean

bracketSpacing — spaces inside object literals { foo }

bracketSameLine
boolean

bracketSameLine — keep > of multi-line HTML/JSX on last line

arrowParens
enum<string>

arrowParens

Available options:
always,
avoid
endOfLine
enum<string>

endOfLine

Available options:
lf,
crlf,
cr,
auto
jsxSingleQuote
boolean

jsxSingleQuote — use single quotes in JSX attributes

singleAttributePerLine
boolean

singleAttributePerLine — one HTML/JSX attribute per line

proseWrap
enum<string>

proseWrap

Available options:
preserve,
always,
never
htmlWhitespace
enum<string>

htmlWhitespaceSensitivity

Available options:
css,
strict,
ignore
overrideMarkdown
boolean

Markdown (*.md, *.mdx) — proseWrap: always, printWidth: 100

overrideHtml
boolean

HTML (*.html) — printWidth: 120, singleAttributePerLine: true

overrideYaml
boolean

YAML (*.yml, *.yaml) — tabWidth: 2, singleQuote: false

overrideJson
boolean

JSON (*.json) — printWidth: 200, trailingComma: none

includeHeader
boolean

Include descriptive header comment (JS/YAML formats only)

includeIgnore
boolean

Also generate a .prettierignore template

Response

Tool output

outputs
object
required
tool
string
required

The tool's slug, echoing the {slug} in the request path.

tool_version
string
required

Output-contract version for this tool.

credits_used
integer
required

Credits this call consumed, after any settlement refund. 0 when metering is disabled.

credits_remaining
integer | null
required

Credits left in the current monthly allowance, or null when metering is disabled.

request_id
string

Correlation id, also sent as x-request-id.