Groundfloor Docs

LLM Gateway API

The model list, usage and the workspace key for the LLM Gateway.

The LLM Gateway is coming soon: the Client Portal doesn't offer it yet. See LLM Gateway.

Base path: /v1/workspaces/{workspace_id}/llm

Once available, requests to models would go to the LLM Gateway itself, not to this API. Store the virtual key in Secrets (for example LITELLM_API_KEY).

See also: LLM Gateway

Models

GET /v1/workspaces/{workspace_id}/llm/models

Returns the Groundfloor catalog plus BYO models when provider keys exist in workspace secrets.

Permission: read

Usage

GET /v1/workspaces/{workspace_id}/llm/usage?since_seconds=604800&limit=100
QueryDefaultNotes
since_seconds86400Lookback window in seconds, 60 to 2,592,000 (30 days)
limit100Max rows requested from the gateway, 1 to 1000. Rows older than the window are then dropped, so you can get fewer than limit

Values outside these ranges return 422. The response has workspace_id, since, until, total_cu, total_tokens and rows (each with ts, model, total_tokens, cu, cost_usd). If the gateway can't be reached, the call still returns 200 with an empty rows list and zero totals, so an empty result doesn't prove there was no usage.

Permission: read

Virtual key

POST /v1/workspaces/{workspace_id}/llm/virtual-key

Mints or rotates the workspace virtual key. The plaintext key is returned once, as { "virtual_key": "…" }. Returns 502 if the gateway can't mint a key. Minting is refused while the workspace is frozen or its organization is suspended.

Permission: administer

Revoke the virtual key

DELETE /v1/workspaces/{workspace_id}/llm/virtual-key

Revokes the workspace virtual key. Returns 204, including when no key exists, so it is safe to repeat. It stays available while the workspace is frozen or suspended, so a leaked key can always be cut off; mint a new key once the freeze is lifted. Returns 502 if the gateway can't revoke the key.

Permission: administer