Skip to main content
The organizations API manages the organization’s AI provider key. With a key set, the Squasher Agent runs its model calls on your own OpenRouter account. Those calls use no AI credits. See Use your own model key.

Operations

Find the organization ID in Organization settings > General.

Access

  • Any member, and an API key of a project in the organization, can read the key status.
  • Only an owner or admin, in a signed-in session, can set, test, or remove the key. An API key cannot change it, even with write scopes.
  • A change and a test are written to the organization’s audit log. The log never holds the key.

Set a key

Squasher checks the key with OpenRouter before it saves it. This check runs no model, so it costs nothing. A key that OpenRouter rejects returns 422 with the reason, and nothing is saved. openrouter is the only provider.

Response

No response contains the key. Squasher stores it encrypted and returns only its last four characters.
  • ai_provider_key is null when the organization has no key.
  • status is failing after OpenRouter refused the key during a run. last_error says why. A passing test sets active again.
  • month_to_date_cost_usd is the model cost that ran on your key this month (UTC).
  • POST .../test also returns test: { "passed": true, "message": "..." }.

CLI and MCP

The CLI has no organization settings, and hosted MCP does not expose these operations: agents never read or write provider keys. Related: Plans and billing.