Beschreibungen auf Englisch
private-chunks.preview.{userId}
The result of a background chunk-preview split calculation. Arrives for large texts submitted to POST /orders/chunks/preview.
Korrekturen an der Spezifikation · 1
Chunk preview is available with an API key
The machine-readable
llm.md§12 claims chunk preview is a web-cabinet endpoint that returns401for API keys. That is wrong: all three preview operations are part of the public surface and require theorders.readscope — as described by both the OpenAPI document and §7.1 of the very samellm.md. If an AI assistant cites §12, it is mistaken.
Kanalparameter
Tragen Sie Ihre Werte ein — sie erscheinen im Kanalnamen, im Code darunter und in der Konsole. Sie werden nirgends gesendet und landen nie in der Seiten-URL.
is the numeric id of the key owner, returned by GET /user.
Kanalname für das Abo
private-chunks.preview.{userId}
Der Name enthält noch Platzhalter in geschweiften Klammern. Damit lässt sich nicht abonnieren: Der Server autorisiert Kanäle nach exaktem Namen.
import Pusher from 'pusher-js';
const pusher = new Pusher('7c4dd881d8116ac76fe89aff71d8c2ff', {
wsHost: 'ws.lumean.app',
wsPort: 443, wssPort: 443,
forceTLS: true,
enabledTransports: ['ws', 'wss'],
cluster: '',
channelAuthorization: {
endpoint: 'https://api.lumean.app/api/public/broadcasting/auth',
headers: { 'X-API-KEY': 'YOUR_API_KEY' },
},
});
const channel = pusher.subscribe('private-chunks.preview.{userId}');
channel.bind('ready', (data) => {
console.log(data);
});import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
const echo = new Echo({
broadcaster: 'pusher',
key: '7c4dd881d8116ac76fe89aff71d8c2ff',
wsHost: 'ws.lumean.app',
wsPort: 443, wssPort: 443,
forceTLS: true,
enabledTransports: ['ws', 'wss'],
cluster: '',
authEndpoint: 'https://api.lumean.app/api/public/broadcasting/auth',
auth: { headers: { 'X-API-KEY': 'YOUR_API_KEY' } },
});
echo.private('chunks.preview.{userId}')
// der führende Punkt gilt für Laravel Echo; pusher-js kennt ihn nicht
.listen('.ready', (e) => {
console.log(e);
});# pip install websocket-client requests
import json, requests, websocket
APP_KEY = "7c4dd881d8116ac76fe89aff71d8c2ff"
WS_URL = "wss://ws.lumean.app:443/app/" + APP_KEY + "?protocol=7&client=python&version=1.0"
CHANNEL = "private-chunks.preview.{userId}"
ws = websocket.create_connection(WS_URL)
# 1. socket_id aus dem Ereignis pusher:connection_established holen
hello = json.loads(ws.recv())
socket_id = json.loads(hello["data"])["socket_id"]
# 2. privates Abo mit dem eigenen API-Schlüssel autorisieren
auth = requests.post("https://api.lumean.app/api/public/broadcasting/auth",
headers={"X-API-KEY": "YOUR_API_KEY"},
data={"socket_id": socket_id, "channel_name": CHANNEL},
).json()["auth"]
# 3. abonnieren und Ereignisse empfangen
ws.send(json.dumps({"event": "pusher:subscribe",
"data": {"auth": auth, "channel": CHANNEL}}))
while True:
print(ws.recv())Payload-Beispiel
Kanal: private-chunks.preview.{userId}
Dies ist ein Beispiel aus der Spezifikation. Es besteht keine Verbindung und es wird auch keine vorgetäuscht: Für ein echtes Abo brauchen Sie Ihren API-Schlüssel.
.ready
{
"status": "ready",
"preview_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"summary": {
"chunks_count": 342,
"total_effective_length": 680000,
"total_price_units": 680000,
"pause_count": 12,
"total_pause_seconds": 30,
"caps_ok": true,
"caps_exceeded": null,
"paragraphs_count": null,
"paragraphs": [
{
"paragraph_index": 0,
"chunks_count": 3,
"first_chunk_index": 0,
"text_length": 2400,
"effective_length": 2380,
"price_units": 2380
}
]
},
"page": {
"current_page": 1,
"per_page": 100,
"total": 342,
"has_more": true
}
}Kanalereignisse: 1
Jedes Ereignis hat einen eigenen Anker, eine vollständige Payload-Tabelle mit Beschreibungen und Enums sowie ein Formbeispiel. Die Namen stehen in Laravel-Echo-Notation — mit führendem Punkt.
.ready
Echo: .ready · pusher-js: ready
The async preview is ready — a limited notification: totals for the whole text (summary) and the first page's meta (page). The chunks themselves are not part of this event — fetch them separately via GET /orders/chunks/preview/{previewId}?page=1.
Payload-Felder
A content-based preview id (sha256 of text+template+mode). Use it for pagination (GET .../{previewId}) and repeat preflight lookups.
summaryerforderlichTotals for the whole text — not just the current page of chunks.
object
Totals for the whole text — not just the current page of chunks.
Total billable length across all chunks, in characters (pauses are excluded).
Number of paragraphs, or null outside paragraph mode.
paragraphsoptionalA per-paragraph aggregate. null means either "the preview is not paragraph-mode" or "there are more paragraphs than the broadcast payload cap" — in the second case paragraphs_count stays a number, and you fetch the full list via GET /orders/chunks/preview/{previewId}.
array<object> | null
A per-paragraph aggregate. null means either "the preview is not paragraph-mode" or "there are more paragraphs than the broadcast payload cap" — in the second case paragraphs_count stays a number, and you fetch the full list via GET /orders/chunks/preview/{previewId}.
The cross-text index of the paragraph's first chunk — use it to locate the paragraph within the paginated chunk list.
pageerforderlichMeta for the first page of chunks. Fetch the chunks themselves with a separate paginated GET request keyed by preview_id.
object
Meta for the first page of chunks. Fetch the chunks themselves with a separate paginated GET request keyed by preview_id.
Total chunks in the split (across all pages).
Payload-Beispiel
{
"status": "ready",
"preview_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"summary": {
"chunks_count": 342,
"total_effective_length": 680000,
"total_price_units": 680000,
"pause_count": 12,
"total_pause_seconds": 30,
"caps_ok": true,
"caps_exceeded": null,
"paragraphs_count": null,
"paragraphs": [
{
"paragraph_index": 0,
"chunks_count": 3,
"first_chunk_index": 0,
"text_length": 2400,
"effective_length": 2380,
"price_units": 2380
}
]
},
"page": {
"current_page": 1,
"per_page": 100,
"total": 342,
"has_more": true
}
}Die Werte stammen aus der Spezifikation, soweit vorhanden; der Rest sind typbasierte Platzhalter. Das ist die Form des Ereignisses, keine Aufzeichnung eines echten.
Alle Kanäle und Verbindungsparameter·POST /broadcasting/auth
Diese Seite einer KI geben
Spezifikation 0.0.1