profound-logoProfound CMS
⌘K
Admin
Theme
DocsGuidaBlogPhilosophy
DocsGuidaBlogPhilosophy

Hybrid

Instradamento parametricoTypes of ComponentsSetup server sent events (SSE) content refetchInstall Profound CMS as a proxyCEL Scripting in Template BuilderProject ScaffoldingMedia Library

Senza testa

Guida rapidaSplit Screen JSON Component Builder with LLMComponent Zod Pull

REST API

REST API OverviewgetConnect your websitegetGET /routesgetOttieni percorsogetGET /blocksgetGET /blocks/with-cel-cachegetGET /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

Genera un report sull'utilizzo stimato dei token di traduzione di un'organizzazione e sull'utilizzo in byte del database per tabella.

Segnala l'utilizzo stimato dei token di traduzione (per lingua) e l'utilizzo in byte del database per tabella per un'organizzazione WorkOS.

Autenticazione: Bearer JWT (WorkOS).

Parametri di query

ParametroTipoObbligatorioNote
orgIduuidsìL'organizzazione WorkOS di cui generare il report.

Risposta

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

Le conte dei token sono stime (un'euristica di circa 4 caratteri per token più un margine fisso per il system prompt per chiamata), non corrispondono alla fatturazione del provider. L'utilizzo del database somma pg_column_size per ogni tabella posseduta; i file binari delle immagini archiviati nello storage di oggetti non sono conteggiati. Nota la particolarità di serde: all'interno di byLanguage le chiavi dei token sono in snake_case (estimated_prompt_tokens, ecc.) mentre l'oggetto padre usa camelCase.

Esempio

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

Errori

  • 400 — orgId mancante o non valido
  • 401 — JWT mancante o non valido
  • 500 — errore nella query
Continue Reading
Previous‹PATCH /translationsNextPOST /csv›