Skip to main content

Using your own API keys (BYOK plan)

This guide is only for workspaces on the BYOK plan or a legacy plan. On any other plan, AI usage is included and there's nothing to set up. See API modes for the difference.

Only the workspace Owner and Admins can manage API keys.


Adding a key​

  1. Open the account menu (top right) and choose API keys.
  2. Find the provider in the Writing or Research section.
  3. Paste your key into its field and click Save.

API keys on the BYOK plan

Machined checks each key with the provider before saving it. Once saved, the provider shows as Connected. To delete a key, click Remove. To replace a key, remove it and add the new one.

Each provider has a Get a key link that takes you to the right page on the provider's site.

The page has two sections:

  • Writing: one provider is enough to write articles. OpenRouter covers all of them on a single key. Alternatively, add a direct provider: OpenAI, Anthropic or Google AI.
  • Research: Perplexity. This is optional, and only needed for deep research.

OpenRouter routes requests to multiple AI providers. One key covers every writing model and every AI image provider in Machined. It's slightly more expensive than adding keys for each provider, because OpenRouter adds a small fee on top of the providers' prices.

  1. Sign up at openrouter.ai.
  2. Go to Keys and create a new API key.
  3. Paste the key into the OpenRouter field and click Save.

OpenAI​

  1. Sign up at platform.openai.com.
  2. Go to API Keys and create a new secret key. Leave permissions set to All.
  3. Paste the key into the OpenAI field and click Save.
Note

Machined requires an OpenAI Platform account. A ChatGPT or ChatGPT Plus subscription will not work. Your Platform account must have billing enabled and be on Tier 1 or above.


Anthropic​

  1. Sign up at console.anthropic.com.
  2. Go to API Keys and create a new key.
  3. Paste the key into the Anthropic field and click Save.

Google AI​

  1. Go to aistudio.google.com.
  2. Click Get API key and create a new key.
  3. Paste the key into the Google AI field and click Save.

Perplexity (optional)​

Perplexity powers deep research, which adds real-time web search and citations to your articles. Without a Perplexity key, deep research isn't available on the BYOK plan. An OpenRouter key doesn't cover it. Other research options still work. See Research.

  1. Sign up at perplexity.ai and open the API settings.
  2. Create a new API key.
  3. Paste the key into the Perplexity field and click Save.

Legacy plans​

Legacy plans can only use OpenAI. Other providers show Not available on this legacy plan, with an Upgrade link. Moving to a current plan unlocks every provider with keys included. Lifetime plans can use every provider.


Troubleshooting​

Your key isn't accepted​

MessageWhat to do
Invalid API keyCopy the key again directly from your provider's dashboard. Make sure it hasn't been revoked.
Invalid … API key format. Keys should start with "…"You may have pasted the key into the wrong provider's field. OpenRouter keys start with sk-or-, OpenAI with sk-, Anthropic with sk-ant-, Google AI with AIza and Perplexity with pplx-.
Failed to validate API keyMachined couldn't reach the provider to check the key. Check your connection and try again. If it keeps happening, check the provider's status page.

Other common causes:

  • Wrong account type: for OpenAI, you need a Platform account with billing enabled, not ChatGPT
  • Restricted key: make sure the key has full permissions
  • No credit: check your provider account has a payment method and available balance

No API key configured​

If none of your keys can write articles, the New article sheet shows No API key configured in place of the Write article button. Add a writing key using the steps above.

Intermittent errors​

AI provider APIs occasionally have problems: slow responses, unresponsive models or full outages. If you're seeing unexpected failures, check your provider's status page:

Machined can't work around a provider-side outage. If a provider is down, wait for it to recover.

Rate limits​

Providers limit how many requests each account can make. If you hit a limit, the article may fail with an error. Write it again once the limit resets.

If you hit rate limits often, moving to a higher usage tier with your provider will raise your limits.

Key security​

Your API keys are encrypted at rest and only ever sent over encrypted (TLS) connections. Once saved, a key is never shown again in Machined.