Get your OpenAI-Compatible API key
Connect any OpenAI-compatible endpoint
Connect any API that supports the OpenAI chat completions format. This works with any provider that implements the standard chat completions endpoint.
VariesBilling depends on your provider. Some offer free access, others require a paid plan or credits.
Available models on Mykey
The models available depend on your endpoint. Any model your provider serves through the OpenAI-compatible chat completions API will work.
Step-by-step guide
Get Your Base URL
Find the endpoint URL from your provider's dashboard or documentation.
- Log in to your provider's dashboard
- Look for the API endpoint or base URL in the documentation
- The URL should point to an OpenAI-compatible endpoint (usually ends with /v1)
- Copy the full URL — you'll need it in the next step
Get Your API Key
Generate or locate your authentication token.
- Navigate to the API Keys or Credentials section in your provider's dashboard
- Create a new key or copy an existing one
- Copy the key immediately — some providers only show it once
Store your key securely. If you lose it, you may need to revoke and regenerate it.
Add to Mykey.chat
Connect your endpoint in Mykey settings.
- In Mykey.chat, go to Settings → API Keys
- Select OpenAI-Compatible
- Paste your Base URL
- Paste your API Key
- Click Save
Select Your Models
Choose which models from your endpoint to use.
- After saving, Mykey will attempt to fetch available models from your endpoint
- Select the models you want to use in your conversations
- You can switch between models mid-conversation
Common issues
| Issue | Fix |
|---|---|
| Connection refused | Check the Base URL is correct and the server is running |
| 404 Not found | The endpoint path may differ — ensure /v1 is included |
| Authentication failed | Some providers use Bearer token format — check their docs |
| Model not found | Ensure the model name matches exactly what your provider serves |
| CORS errors (local) | Ensure CORS is enabled on your local server |
Frequently asked questions
What does OpenAI-compatible mean?
It means the API accepts the same request format as OpenAI's API (POST to /v1/chat/completions with the same JSON structure). Many providers support this format, making them easy to integrate.
Can I use a locally hosted model?
Yes. If your local server exposes an OpenAI-compatible endpoint and Mykey can reach it, you can connect it as a custom provider. You may need to expose the endpoint via a tunnel if Mykey is cloud-hosted.
Ready to connect your OpenAI-Compatible key?
Sign in to Mykey and paste your API key in Settings. It will be encrypted with AES-256 immediately.
Sign in to Mykey