Skip to main content

OpenRouter Integration

Connect OpenRouter to bring your OpenRouter credits, usage and activity into Cloud ex Machina, next to your cloud infrastructure costs.

DataOpenRouter APIKey type
Account credits and total usage/api/v1/creditsManagement key
Account activity per model and per day/api/v1/activityManagement key
API keys and their credit limits/api/v1/keysManagement key

Only a Management key reads account-wide data. A normal API key reads the usage of that one key only.

A Management key cannot run models, so it cannot spend credits.


Prerequisites​

  • Cloud ex Machina Admin access.
  • The owner of the OpenRouter account. In an OpenRouter organization, an Org Admin.

Step 1: Create a Management key​

Key permissions

A Management key can also create and delete API keys in your account. OpenRouter offers no read-only Management key. Store the key in a safe place.

  1. Sign in to openrouter.ai.
  2. Open openrouter.ai/settings/management-keys.
  3. Click Create New Key and name it Cloud ex Machina.
  4. Set an expiry date.
  5. Copy the key. OpenRouter shows the key only once.

Step 2: Add the connection in Cloud ex Machina​

  1. In the sidebar, click Integrations.
  2. Find OpenRouter and click Sign in. If the integration already has a connection, the button is Add connection.
  3. Fill in API Key with the key from Step 1.
  4. Submit the form. Cloud ex Machina checks the key with OpenRouter and saves the connection.

Remove a connection​

  1. Click the connection row under the OpenRouter card.
  2. Click Disconnect.
  3. Delete the Management key in OpenRouter.

Next Steps​