FruxonDocs
ApiAgentassetestimate

Estimates token count for any supported source type.

The accepted config keys and their validation rules are described by the `source-types` endpoint.

POST
/v1/tenants/{tenant}/agents/{agent}/assets:estimate

Path Parameters

agent*string

The unique identifier of the agent.

tenant*string

The tenant identifier

The source type and configuration parameters.

type*string|null

Asset source type key (e.g. 'confluence', 'github', 'jira', 'google_drive', 'notion', 'zendesk'). Must match a key returned by the :source-types endpoint.

parameters*|null

Flat key-value config map. Keys are camelCase property names from the matching Fruxon.Server.Controllers.AssetTypeDescriptor.Properties list.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/agents/string/assets:estimate" \  -H "Content-Type: application/json" \  -d '{    "type": "string",    "parameters": {      "property1": "string",      "property2": "string"    }  }'
{
  "tokenCount": 0,
  "chunkCount": 0,
  "documentCount": 0,
  "documents": [
    {
      "fileName": "string",
      "tokenCount": 0,
      "chunkCount": 0
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty