Create a parser backend

Save parser backend configuration and obtain a new ID.

POST https://api.moi.matrixorigin.cn/v5/parser/backends

Before you call this API

Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5. For private deployments, use the corresponding product API URL.

Configure identity, Workspace, and permissions in the same environment.

Request

curl --request POST \
  "$BASE_URL/parser/backends" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data-raw '{"name":"临时解析后端","type":"PARSER_MINERU","api_keys_encrypted":["key-example-a","key-example-b"],"supported_mime_types":["application/pdf"]}'

Parameter

Location

Type

Required

Description

X-Workspace-ID

Headers

string

Yes

Workspace ID in the same environment.

name

Body

string

Yes

Nonempty name after trimming surrounding whitespace.

type

Body

string

No

An official PARSER_* type. Omitted/non-Parser values become PARSER_MINERU.

api_key

Body

string

No

Single key. A nonempty pool takes precedence using its first item; not returned.

api_keys_encrypted

Body

array (strings)

No

Ordered key pool. Every item must be nonempty after trimming. A nonempty pool overrides the single key.

timeout_seconds

Body

integer

No

Defaults to 3600 seconds when omitted/nonpositive. Positive values must not exceed 86400.

supported_mime_types

Body

array (strings)

No

Supported MIME declarations. An empty set declares catch-all, without verifying actual adapter capability.

Requires Workspace model_backend.create. Ordinary creation does not create endpoints. Save id first, then create an endpoint; parser success is not verified. DEV types may use internal placeholders and are not a basis for production integration recommendations.

Save response data.id as BACKEND_ID, then Create an access endpoint.

Successful response

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "id": 12,
    "name": "临时解析后端",
    "type": "PARSER_MINERU",
    "timeout_seconds": 3600,
    "supported_mime_types": [
      "application/pdf"
    ],
    "created_at": 1794445200,
    "updated_at": 1794445200
  }
}

Field

Type

Description

code

string

HTTP200, OK on success.

msg

string

OK on success.

data

object

Actual objects or empty values; do not infer them from LLM envelopes.

Error responses

Errors and result confirmation distinguishes actual input, object admission, and business results.

Last updated on