Skip to content

Create a parser

POST
/v1/parsers
curl --request POST \
--url http://127.0.0.1:8000/v1/parsers \
--header 'Content-Type: application/json' \
--data '{ "name": "document-to-markdown", "display_name": "Document to Markdown", "output_format": "markdown", "instructions": "", "reasoning_effort": "none", "provider_name": "openai", "model": "gpt-5-mini" }'

Create a reusable document-to-Markdown parser with an optional custom prompt.

Media typeapplication/json
CreateParserRequest

Definition used to create a reusable document parser.

object
name
Any of:
string
display_name
Any of:
string
output_format
ParserOutputFormat

Output format produced by the parser. Markdown is the v0.3 format.

string
default: markdown
Allowed values: markdown
instructions
Instructions

Optional instructions appended to the document transcription prompt.

string
""
reasoning_effort
Any of:
ReasoningEffort

Explicit reasoning effort for an extractor’s or parser’s model.

The values mirror OpenAI’s reasoning_effort parameter. Extractors store None by default, which means “send no reasoning parameter and use the model’s own default” — the only setting that is safe for every model. Which explicit values a model accepts is the provider’s call; incompatible pairs surface the provider’s error at extraction time.

string
Allowed values: none minimal low medium high xhigh
provider_name
Any of:
ProviderName

The fixed set of model providers ParseHawk ships.

Providers are preconfigured and configurable, not user-creatable, so the name doubles as the stable identifier extractors reference and as the discriminator the engine factory switches on.

string
Allowed values: openai microsoft_foundry openai_compatible_api
model
Any of:
string

Successful Response

Media typeapplication/json
ParserResponse

Public representation of a reusable parser.

object
id
required
Id

Immutable parser identifier.

string
name
required
Name

Stable URL-safe parser name.

string
display_name
required
Display Name

Human-readable parser label.

string
output_format
required
ParserOutputFormat

Configured parser output format.

string
Allowed values: markdown
instructions
required
Instructions

Document parsing instructions.

string
reasoning_effort
required
Any of:
ReasoningEffort

Explicit reasoning effort for an extractor’s or parser’s model.

The values mirror OpenAI’s reasoning_effort parameter. Extractors store None by default, which means “send no reasoning parameter and use the model’s own default” — the only setting that is safe for every model. Which explicit values a model accepts is the provider’s call; incompatible pairs surface the provider’s error at extraction time.

string
Allowed values: none minimal low medium high xhigh
provider_name
required
Any of:
ProviderName

The fixed set of model providers ParseHawk ships.

Providers are preconfigured and configurable, not user-creatable, so the name doubles as the stable identifier extractors reference and as the discriminator the engine factory switches on.

string
Allowed values: openai microsoft_foundry openai_compatible_api
model
required
Any of:
string
source
required
ParserSource

How the parser was created.

string
Allowed values: user prebuilt
is_prebuilt
required
Is Prebuilt

Whether ParseHawk ships this parser.

boolean
created_at
required
Created At

UTC creation time.

string format: date-time
updated_at
required
Updated At

UTC last-update time.

string format: date-time
Example
{
"output_format": "markdown",
"reasoning_effort": "none",
"provider_name": "openai",
"source": "user"
}

The request or domain input failed validation.

Media typeapplication/json
ApiErrorResponse

Error returned by request validation or a ParseHawk domain service.

object
code
Any of:
string
detail
required
Any of:
string
Examplegenerated
{
"code": "example",
"detail": [
{}
]
}

Unexpected server error.

Media typeapplication/json
ApiErrorResponse

Error returned by request validation or a ParseHawk domain service.

object
code
Any of:
string
detail
required
Any of:
string
Examplegenerated
{
"code": "example",
"detail": [
{}
]
}

Persistence is temporarily busy and the request can be retried.

Media typeapplication/json
ApiErrorResponse

Error returned by request validation or a ParseHawk domain service.

object
code
Any of:
string
detail
required
Any of:
string
Examplegenerated
{
"code": "example",
"detail": [
{}
]
}