How to use your own OpenAI and Anthropic keys and your subaccount API key
Connect your own OpenAI or Anthropic key to bypass Lety's margin on those models, and keep the subaccount API key, which external systems use to communicate with your agents, safe.
Last updated 10 days ago
In API Keys you manage two kinds of keys: your own keys from AI providers, so you pay them directly and skip Lety's margin on token usage for their models, and the subaccount API key, which different systems use to communicate with your agents.
Step 1: Open API Keys
In the left menu, click Settings and open the API Keys tab.
Step 2: Add your OpenAI or Anthropic key
In PROVIDER API KEYS, paste your key in OpenAI API Key (it starts with sk-proj-) or Anthropic API Key (it starts with sk-ant-), and click Save in that box.

From then on, your agents that use that provider's models run with your key, skipping Lety's margin on those models. You have to create the key in your OpenAI or Anthropic account.
Once a key is saved, its box says the key is configured, for example OpenAI API key is configured., and shows two buttons: Replace, to save a different key, and Delete, to remove it.
Tip: To go back to Lety's key, click Delete and confirm. From then on, your agents use Lety's platform key with platform pricing, which includes Lety's margin.
Step 3: Use your subaccount API key
In SUBACCOUNT API KEY you'll see the key that authenticates requests from other platforms on behalf of your subaccounts, for example, when an external system needs to send messages to your agents. Click Copy to copy it.

In each agent's test panel, Settings & Credentials shows the agent's details you need for those requests.
Important: This key gives access to your subaccounts' operations. Never share it publicly or put it in your code repositories. If you think someone else has it without authorization, click Regenerate key: the old key stops working, so update it in every system that uses it.
Technical reference
Who can change them: provider keys are set by the agency. Your subaccounts can't change them.
Your keys are protected: once saved, the platform doesn't show them again.
Providers: OpenAI and Anthropic. Other models keep using Lety's platform keys.
Common problems
My agents stopped answering after I added my key
My agents stopped answering after I added my key
Check in your OpenAI or Anthropic account that the key is active and has balance or credits. If you want to keep working while you fix it, click Delete in that box and confirm to go back to Lety's key.
My external system stopped connecting to the agents
My external system stopped connecting to the agents
If someone clicked Regenerate key, the previous key no longer works. Copy the new one and update it in that system.
My calls with the subaccount API key return 403 Forbidden
My calls with the subaccount API key return 403 Forbidden
If the key is correct and the agent is published, the account needs a fix on our side. Contact support with the subaccount's email.
Done
Your provider keys and your subaccount key are set up and safe.
Need help? Contact support from your platform's home view. Never send your keys to anyone, not even support.
Was this helpful?
Still need help? Share an idea