İçeriğe geç
Lumean API

Açıklamalar İngilizce

Bölümün arayüzü dilinize çevrildi, ancak işlem, şema ve hata açıklamaları yalnızca Rusça ve İngilizce mevcut — burada İngilizce sürüm gösteriliyor.

private-chunks.preview.{userId}

The result of a background chunk-preview split calculation. Arrives for large texts submitted to POST /orders/chunks/preview.

Spesifikasyon düzeltmeleri · 1

  • Chunk preview is available with an API key

    The machine-readable llm.md §12 claims chunk preview is a web-cabinet endpoint that returns 401 for API keys. That is wrong: all three preview operations are part of the public surface and require the orders.read scope — as described by both the OpenAPI document and §7.1 of the very same llm.md. If an AI assistant cites §12, it is mistaken.

Kanal parametreleri

Değerlerinizi girin — kanal adında, aşağıdaki kodda ve konsolda görünürler. Hiçbir yere gönderilmez ve asla sayfa adresine yazılmazlar.

is the numeric id of the key owner, returned by GET /user.

Abone olunacak kanal adı

private-chunks.preview.{userId}

Adda hâlâ süslü parantez içinde yer tutucular var. Bu adla abone olamazsınız: sunucu kanalları tam ad eşleşmesiyle yetkilendirir.

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);
});

Payload örneği

bağlı değil

Kanal: private-chunks.preview.{userId}

Bu, spesifikasyondan bir örnektir. Bağlantı yok ve taklit de edilmiyor: gerçekten abone olmak için API anahtarınız gerekir.

orders.read izni olan bir anahtar gerekir

.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
  }
}

Kanal olayları: 1

Her olayın kendi çapa bağlantısı, açıklamalar ve enum değerleriyle tam bir payload tablosu ve örnek bir yapısı vardır. Adlar Laravel Echo gösteriminde, yani baştaki noktayla gösterilir.

.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 alanları

statuszorunlu
Değerlerready
string
Örnek ready
preview_idzorunlu

A content-based preview id (sha256 of text+template+mode). Use it for pagination (GET .../{previewId}) and repeat preflight lookups.

string
Örnek a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
summaryzorunlu

Totals for the whole text — not just the current page of chunks.

object
chunks_countisteğe bağlı
integer
Örnek 342
total_effective_lengthisteğe bağlı

Total billable length across all chunks, in characters (pauses are excluded).

integer
Örnek 680000
total_price_unitsisteğe bağlı
integer
Örnek 680000
pause_countisteğe bağlı
integer
Örnek 12
total_pause_secondsisteğe bağlı
number
Örnek 30
caps_okisteğe bağlı
boolean
Örnek true
caps_exceededisteğe bağlı
Değerlercountsingletotalchunksnull
string | null
paragraphs_countisteğe bağlı

Number of paragraphs, or null outside paragraph mode.

integer | null
paragraphsisteğe bağlı

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}.

array<object> | null
paragraph_indexisteğe bağlı
integer
Örnek 0
chunks_countisteğe bağlı
integer
Örnek 3
first_chunk_indexisteğe bağlı

The cross-text index of the paragraph's first chunk — use it to locate the paragraph within the paginated chunk list.

integer
Örnek 0
text_lengthisteğe bağlı
integer
Örnek 2400
effective_lengthisteğe bağlı
integer
Örnek 2380
price_unitsisteğe bağlı
integer
Örnek 2380
pagezorunlu

Meta for the first page of chunks. Fetch the chunks themselves with a separate paginated GET request keyed by preview_id.

object
current_pageisteğe bağlı
integer
Örnek 1
per_pageisteğe bağlı
integer
Örnek 100
totalisteğe bağlı

Total chunks in the split (across all pages).

integer
Örnek 342
has_moreisteğe bağlı
boolean
Örnek true

Payload örneği

{
  "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
  }
}

Değerler, spesifikasyonda bulunduğu yerde oradan alınır; geri kalanlar türe dayalı yer tutuculardır. Bu, olayın yapısıdır, gerçek bir olayın kaydı değildir.

Tüm kanallar ve bağlantı parametreleri·POST /broadcasting/auth

Bu sayfayı yapay zekâya verin

.md sürümünü açllm.md

spesifikasyon 0.0.1