Pipelines
Name, version, and reuse an extraction setup.
A pipeline bundles the models, JSON Schema, and options for an extraction. Your application sends a pipeline ID instead of repeating that configuration with every document.
Create a pipeline
curl -X POST 'https://api.openparser.dev/pipelines' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Invoice fields",
"slug": "invoice-fields",
"ocr_model": "paddleocr-vl-1.6",
"llm_model": "openai/gpt-6-luna",
"schema": {
"type": "object",
"properties": {
"invoice_number": { "type": "string" }
},
"required": ["invoice_number"],
"additionalProperties": false
}
}'openparser pipelines create \
--name "Invoice fields" \
--slug invoice-fields \
--ocr-model paddleocr-vl-1.6 \
--llm-model openai/gpt-6-luna \
--schema-json '{"type":"object","properties":{"invoice_number":{"type":"string"}},"required":["invoice_number"],"additionalProperties":false}'const pipeline = await client.pipelines.create({
name: 'Invoice fields',
slug: 'invoice-fields',
ocr_model: 'paddleocr-vl-1.6',
llm_model: 'openai/gpt-6-luna',
schema: {
type: 'object',
properties: {
invoice_number: { type: 'string' },
},
required: ['invoice_number'],
additionalProperties: false,
},
});pipeline = client.pipelines.create({
"name": "Invoice fields",
"slug": "invoice-fields",
"ocr_model": "paddleocr-vl-1.6",
"llm_model": "openai/gpt-6-luna",
"schema": {
"type": "object",
"properties": {
"invoice_number": {"type": "string"},
},
"required": ["invoice_number"],
"additionalProperties": False,
},
})The response includes an oppl_… ID and a numeric version. Store the ID in your application configuration.
Choose llm_model from GET /models/llm. The compatible model list can change over time.
Use the pipeline
Pass the pipeline ID instead of inline model, schema, and extraction options:
curl -X POST 'https://api.openparser.dev/extract/async' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || openssl rand -hex 16)" \
-F 'request={"pipeline_id":"oppl_REPLACE_ME"};type=application/json' \
-F 'file=@./document.pdf'openparser extract async ./document.pdf --pipeline-id oppl_REPLACE_MEconst accepted = await client.extract.async(
{ pipeline_id: 'oppl_REPLACE_ME' },
file,
);from pathlib import Path
accepted = client.extract.async_(
{"pipeline_id": "oppl_REPLACE_ME"},
file=Path("document.pdf"),
)OpenParser records the current pipeline version when it accepts the job. Later edits affect new jobs only; running and completed jobs keep their original configuration.
Manage pipelines
| Method | Path | Purpose |
|---|---|---|
GET | /pipelines | List active pipelines |
POST | /pipelines | Create a pipeline |
GET | /pipelines/{id} | Get a pipeline |
PATCH | /pipelines/{id} | Update fields and increment the version |
DELETE | /pipelines/{id} | Soft-delete a pipeline |
Names and slugs must be unique within your organization. A duplicate returns 409 pipeline_name_conflict. Deleted pipelines and IDs owned by another organization return 404 Not Found.