Ingestion Rules

Create an ingestion rule

Creates a rule mapping a content_type glob to a converter. Exactly one of tool_id or agent_id must be set.

post/v1/projects/{project_id}/ingestion-rules

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/ingestion-rules
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Request body

content_type_globstring required

MIME type glob matched against a file's content_type. At most 4 wildcards and 255 characters — a MIME glob needs one on each side of the slash at most.

tool_idstring

Converter tool id (mutually exclusive with agent_id)

agent_idstring

Converter agent id (mutually exclusive with tool_id)

actionstring

Operation id, required for mcp tool converters

preset_parametersobject

Merged into the tool input before invocation (tool converters only)

native_extraction'first' | 'skip'

For native types (PDF/text): first (default) converts only when native extraction yields no text; skip always converts.

file_delivery'base64' | 'download_url'

How the file reaches a tool converter (default base64)

chunk_strategy'page' | 'whole' | 'size'

Default chunk strategy, overridable per ingest request

chunk_sizeinteger

Default window size in characters for the size strategy

chunk_overlapinteger

Default overlap in characters for the size strategy

metadataMetadataBag

Caller-owned annotations on a resource, stored as the object they were written as: the types a value was written with are the types a read returns, so a filter can ask an ordering question about a number. Unlike other body fields, keys are stored and returned verbatim in the casing supplied — they are not converted between snake_case and camelCase.

No key is reserved, and that is the point: every piece of state the platform owns lives in its own typed column, so nothing written here reaches platform state. The platform never reads the bag — it is not an IAM context, not a policy input and not part of a prompt — which is what separates it from a tag bag.

Example request

{
  "content_type_glob": "image/*",
  "tool_id": "tool_V1StGXR8Z5jdHi6B",
  "agent_id": "agent_V1StGXR8Z5jdHi6B",
  "metadata": {
    "author": "John",
    "revision": 2
  }
}

Response

Ingestion rule created

idstring
project_idstring
content_type_globstring
tool_idstring nullable
agent_idstring nullable
actionstring nullable
preset_parametersobject nullable
native_extraction'first' | 'skip'
file_delivery'base64' | 'download_url'
chunk_strategystring nullable
chunk_sizeinteger nullable
chunk_overlapinteger nullable
metadataMetadataBag

Caller-owned annotations on a resource, stored as the object they were written as: the types a value was written with are the types a read returns, so a filter can ask an ordering question about a number. Unlike other body fields, keys are stored and returned verbatim in the casing supplied — they are not converted between snake_case and camelCase.

No key is reserved, and that is the point: every piece of state the platform owns lives in its own typed column, so nothing written here reaches platform state. The platform never reads the bag — it is not an IAM context, not a policy input and not part of a prompt — which is what separates it from a tag bag.

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "igr_V1StGXR8Z5jdHi6B",
  "content_type_glob": "image/*",
  "metadata": {
    "author": "John",
    "revision": 2
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.