Connect your own AI model
Add your own API key from Anthropic, OpenAI, Google or xAI so Agents and the SEO Tool run on your account. Change or remove it any time.
On this page
- Before you start
- Connect your key
- Rules for the fields
- Where Pinned uses your key
- Read the status line
- Change your key or model
- Remove your key
- Troubleshooting
- The provider refused this key
- The provider does not know that model id
- The provider is rate-limiting this key
- The provider did not answer in time
- The key could not be verified
- That key looks too short or too long
- The model name is rejected
- The key could not be saved or removed
Connect your own AI model key so that Agents and the SEO Tool run on your account. You add the key once on the Connections page, and Pinned uses it wherever a model is needed.
Note
Available on the Business plan.
Before you start
- You need the Business plan. See Choose a plan and upgrade.
- You need an API key from one of four providers: Anthropic (Claude), OpenAI, Google (Gemini) or xAI (Grok). You create the key in your provider's own console.
The model runs on your account, and your provider bills you directly for what it uses.
Connect your key
In the sidebar, click Connections, or open Connections.
Scroll to the AI model section. Until a key is stored, it reads "Bring your own API key — used by Agents and the SEO Tool". Click Connect.
Next to Provider, choose Anthropic (Claude), OpenAI, Google (Gemini) or xAI (Grok).
Optional: in Model (optional), type the model you want to use. The grey hint shows the provider's default model. Leave the field blank to use that default. Changing the provider clears this field.
In API key, paste your key. The hint reads "Paste your key". Under the field, a link to your provider's console opens the page where you create a key. With Anthropic selected, it reads Anthropic's console.
Click Save & test.
While Pinned checks the key, the button reads Checking the key…. Pinned sends one tiny request to your provider to make sure the key works, then stores the key encrypted. When the check passes, the form closes and a message starting with "Connected —" tells you how quickly the key answered.
If the check fails, nothing is stored and a red message under the field tells you why. See Troubleshooting below.
Rules for the fields
- The key must be at least 16 characters. Save & test stays dimmed until it is.
- The model name can be up to 80 characters: letters, digits, dots, dashes, colons and slashes.
Where Pinned uses your key
You connect one key per account. Agents and the SEO Tool use it ahead of anything else. The SEO Tool uses it for workspaces you own. See Get started with Agents and Set up the SEO Tool.
Read the status line
Under AI model, the status line tells you where things stand:
- While the page loads, it reads Checking….
- With no key stored, it shows the "Bring your own API key" line.
- With a key stored, it shows the provider, the model, and "key ending" followed by the last four characters of your key. It also shows the date the key last worked.
Those are the only details Pinned shows about your key. The key itself is never displayed again.
If Agents or the SEO Tool used your key and it failed, a red line appears under the status: Last use failed: followed by the reason. Change the key to fix it. Saving a key that passes the test clears the message.
Change your key or model
- On the AI model card, click Change.
- Pick a different Provider, edit Model (optional), or both.
- Paste a key in API key. The hint reads "Paste a new key to replace the stored one". You need to paste a key every time you save, even if you only change the model.
- Click Save & test.
Click Cancel at any time to close the form and keep what you have.
Remove your key
- On the AI model card, click Remove.
- Confirm the prompt, which reads "Remove your AI model key? Agents and the SEO Tool will fall back to whatever else is set up."
The button reads Removing… while it works. When it's done, the card shows Key removed.
Troubleshooting
The provider refused this key
The message reads The provider refused this key. Check it and try again. Check that you copied the whole key with no extra characters, that it belongs to the provider you picked, and that it hasn't been deleted in your provider's console. Then paste it again.
The provider does not know that model id
The message reads The provider does not know that model id. Check the spelling of the model name, or clear Model (optional) to use the provider's default.
The provider is rate-limiting this key
The message reads The provider is rate-limiting this key right now. Try again in a minute. Wait a minute and click Save & test again.
The provider did not answer in time
The message reads The provider did not answer in time. Click Save & test again. If it keeps happening, check your provider's status page.
The key could not be verified
For other problems, Pinned shows the provider's own message, or The key could not be verified. Check the key and the provider you picked, then try again.
That key looks too short or too long
A short key shows That key looks too short. A key that is too long shows That key looks too long. Paste the full key again.
The model name is rejected
If the model name uses other characters, you see Model ids are letters, digits, dots, dashes, colons and slashes. Remove spaces and special characters.
The key could not be saved or removed
The message reads The key could not be saved. or The key could not be saved. Check your connection and try again. Check your internet connection and try again. If The key could not be removed right now. appears when you remove a key, try again later. If either keeps appearing, write to support@pinned.gg.