Integrations
OpenCode
Add freeaiapi.ai as a custom provider in OpenCode.
- Run
/connect, choose Other, enter the provider idfreeaiapiand your API key. - Add the provider to
opencode.jsonin your project:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"freeaiapi": {
"npm": "@ai-sdk/openai-compatible",
"name": "freeaiapi.ai",
"options": { "baseURL": "https://api.freeaiapi.ai/v1" },
"models": {
"deepseek-chat": { "name": "DeepSeek Chat" },
"gpt-4o-mini": { "name": "GPT-4o mini" }
}
}
}
}Add any model ID from the model list under models. To read the key from an environment variable instead of /connect, set "apiKey": "{env:FREEAIAPI_KEY}" inside options.