profound-logoProfound CMS
⌘K
Admin
Theme
DocsTutorialBlogPhilosophy
DocsTutorialBlogPhilosophy

Hybrid

Collection of Pages with ComponentsTypes of ComponentsSetup server sent events (SSE) content refetchInstall Profound CMS as a proxyCEL Scripting in Template BuilderProject ScaffoldingBibliotecă media

Fără interfață

Pornire rapidăSplit Screen JSON Component Builder with LLMComponent Zod Pull

API REST

Prezentare generală API RESTgetConnect your websitegetGET /routesgetGET /routegetGET /blocksgetObține blocuri cu cache CELgetGET /blocks/generatedgetGET /componentsgetGET /components/{name}getGET /dataset/{schema_name}getGET /content-changes (SSE)patchPATCH /dataset/{schema_name}postPOST /translationpatchPATCH /translationsgetGET /usagepostPOST /csvpatchPATCH /csv
All Systems Operational
Powered Byprofound-logo
Theme

GET /usage

Raportează utilizarea estimată a jetoanelor de traducere și utilizarea bazei de date în octeți pe tabel pentru o organizație.

Raportează utilizarea estimată a jetoanelor de traducere (pe limbă) și utilizarea bazei de date în octeți pe tabel pentru o organizație WorkOS.

Autentificare: Bearer JWT (WorkOS).

Parametri de interogare

ParametruTipObligatoriuNote
orgIduuiddaOrganizația WorkOS pentru care se generează raportul.

Răspuns

{
  "orgId": "...",
  "translations": {
    "translations": 120,
    "estimatedPromptTokens": 45000,
    "estimatedCompletionTokens": 42000,
    "estimatedTotalTokens": 87000,
    "byLanguage": [
      {
        "language": "fr",
        "translations": 40,
        "estimated_prompt_tokens": 15000,
        "estimated_completion_tokens": 14000,
        "estimated_total_tokens": 29000
      }
    ],
    "note": "..."
  },
  "database": {
    "totalBytes": 1048576,
    "totalHuman": "1.0 MB",
    "byTable": [ { "table": "documents", "rows": 42, "bytes": 500000 } ],
    "note": "..."
  }
}

Numărul de jetoane este estimativ (o euristică de aproximativ 4 caractere pe jeton, plus o alocație fixă pentru promptul de sistem per apel), nu reprezintă consumul facturat de furnizor. Utilizarea bazei de date însumează pg_column_size pentru fiecare tabel deținut; binarele de imagini stocate în stocarea de obiecte nu sunt luate în calcul. Observă particularitatea de serializare: în byLanguage, cheile pentru jetoane sunt în snake_case (estimated_prompt_tokens etc.), în timp ce obiectul părinte folosește camelCase.

Exemplu

curl '{CMS_API_URL}/usage?orgId=<uuid>' \
  -H 'Authorization: Bearer <workos-jwt>'

Erori

  • 400 — orgId lipsă sau invalid
  • 401 — JWT lipsă sau invalid
  • 500 — eșec al interogării
Continue Reading
Previous‹PATCH /translationsNextPOST /csv›