Skip to main content

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.

Streaming

Some API endpoints support Server-Sent Events (SSE) for real-time streaming responses.

How It Works

Streaming endpoints return a stream of events rather than a single response. Each event is a JSON object prefixed with data:.

Event Format

data: {"type": "message", "content": "Hello"}

data: {"type": "done"}

SDK Examples

from meibel import MeibelClient

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

# Upload a file
with open("document.pdf", "rb") as f:
    result = client.agents.sessions.send_chat_message_stream("session_id_value", file=f, filename="document.pdf")
    print(result)