Skip to main content
POST
/
datasources
/
uploads
/
process
Python
from meibel import MeibelClient

client = MeibelClient(api_key="your-api-key")

# Upload a file
with open("document.pdf", "rb") as f:
    result = client.datasources.file_uploads.upload_and_list_content(file=f, filename="document.pdf")
    print(result)
{
  "datasource_id": "<string>",
  "items": [
    {
      "name": "<string>",
      "path": "<string>",
      "type": "<string>",
      "size": 123,
      "media_type": "<string>",
      "last_modified": "<string>",
      "etag": "<string>"
    }
  ],
  "continuation_token": "<string>",
  "ingest_url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.meibel.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Meibel-API-Key
string
header
required

Body

multipart/form-data
files
file[]
required

One or more files to upload

datasource_id
string

ID of an existing datasource to upload to. Provide this or name.

Example:

""

name
string

Name for a new datasource to create. Provide this or datasource_id.

Example:

""

description
string

Description of the new datasource (only used when creating with name).

Example:

""

metadata_config
MetadataConfigRequest · object

Configure automatic metadata extraction from documents on ingest.

trigger_ingest
boolean
default:false

Start ingestion after upload completes. Returns ingest_url to poll for status.

Response

Successful Response

Result of a synchronous upload — waits until files are persisted, optionally triggers ingest, and returns the resulting content listing.

datasource_id
string
required

ID of the datasource the files were uploaded to

items
ContentItem · object[]
required

Content items present on the datasource after the upload completes

continuation_token
string | null

Set when the listing is truncated — pass to GET /datasources/{id}/content to fetch the rest

ingest_url
string | null

URL to poll for ingest status. Only set when trigger_ingest=true was supplied