kind is ocr or audio. JSON body. Authentication: X-API-Key: <key> or Authorization: Bearer <key> header.
/pipelines/{kind}/validate
Request body
The following parameters can be included in the request body:
Parameters
kind
Path. ocr or audio.
pipeline
Graph (see "Graph format"). Here, a JSON object.
pipeline_hash
SHA-256 fingerprint of the graph (see "Graph format"). If it does not match the submitted graph: 422 hash_mismatch.
Successful response
The following fields are returned in a successful response:
Response fields
valid
The graph is valid.
pipeline_hash
SHA-256 fingerprint of the graph.
warnings
Non-blocking warnings (for example unreachable_node).
Examples
Code examples for using this endpoint:
curl -X POST https://api-endpoints.alphaedge-ai.com/pipelines/ocr/validate \
-H "X-API-Key: $ALPHAEDGE_API_KEY" -H "Content-Type: application/json" \
-d "{\"pipeline\": $(cat pipeline.json)}"
Response
Sample API response:
{
"valid": true,
"pipeline_hash": "96c6be3b…",
"warnings": []
}
Invalid graph (422)
error.code is invalid_pipeline, or limit_exceeded if all errors are limit overruns. Details are in error.errors[]; each entry has a code, often a node_id and a port.
{
"error": {
"type": "invalid_pipeline",
"code": "invalid_pipeline",
"message": "Port "no" of n2 has no continuation.",
"errors": [
{ "code": "dangling_port", "node_id": "n2", "port": "no", "message": "…" }
]
},
"request_id": "7f4bcd…"
}
The list of errors[] codes is on the "Graph format" page.