Create or replace a parser
const url = 'http://127.0.0.1:8000/v1/parsers/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","display_name":"Document to Markdown","output_format":"markdown","instructions":"","reasoning_effort":"none","provider_name":"openai","model":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:8000/v1/parsers/example \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "display_name": "Document to Markdown", "output_format": "markdown", "instructions": "", "reasoning_effort": "none", "provider_name": "openai", "model": "example" }'Create a named parser when absent or replace its complete definition when present.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Stable parser name.
Stable parser name.
Request Bodyrequired
Section titled “Request Bodyrequired”Complete parser definition used to create or replace a parser by reference.
object
Human-readable parser label.
Output format produced by the parser.
Document parsing instructions.
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.
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.
Responses
Section titled “Responses”Successful Response
Public representation of a reusable parser.
object
Immutable parser identifier.
Stable URL-safe parser name.
Human-readable parser label.
Configured parser output format.
Document parsing instructions.
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.
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.
How the parser was created.
Whether ParseHawk ships this parser.
UTC creation time.
UTC last-update time.
Example
{ "output_format": "markdown", "reasoning_effort": "none", "provider_name": "openai", "source": "user"}The request or domain input failed validation.
Error returned by request validation or a ParseHawk domain service.
object
object
Examplegenerated
{ "code": "example", "detail": [ {} ]}Unexpected server error.
Error returned by request validation or a ParseHawk domain service.
object
object
Examplegenerated
{ "code": "example", "detail": [ {} ]}Persistence is temporarily busy and the request can be retried.
Error returned by request validation or a ParseHawk domain service.
object
object
Examplegenerated
{ "code": "example", "detail": [ {} ]}