HFAI Cloud · integration
OpenCode
on HFAI Cloud.
A provider entry in opencode.json.
A custom provider, declared once.
Its own config file,
with this endpoint inside.
OpenCode's documentation site describes it as an open source AI coding agent available as a terminal interface, a desktop app or an IDE extension. Its providers page shows how a custom endpoint is declared: a provider entry that names an npm package speaking the OpenAI-compatible wire format, an options object holding the baseURL and the apiKey, and a models map keyed by the identifier you want the agent to offer. Checked against opencode.ai/docs/providers.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"hfai": {
"npm": "@ai-sdk/openai-compatible",
"name": "HFAI Cloud",
"options": {
"baseURL": "https://api.heartflowai.net/v1",
"apiKey": "hfai_live_…"
},
"models": {
"gpt-oss:120b": { "name": "GPT-OSS 120B" }
}
}
}
}
That file is the configuration the page describes, with our endpoint in the two option fields and one catalogue model exposed in the map. The provider identifier on the left is yours to choose; the agent uses it to attribute the model, not to reach it, so the endpoint and the key do the addressing.
OpenCode is a project of its own with its own contributors and governance. HeartFlowAI does not author the agent, has no partnership with its maintainers, and this page is not an endorsement by either side. The configuration keys are OpenCode's, checked at opencode.ai/docs/config.
One provider block, several models.
The map is where
the identifiers live.
The provider block is written once and the models map decides what appears in the agent, so adding a model is an edit inside the map rather than a new provider.
The request shape is documented in the API reference, the balances on HFAI Cloud, and GPT-OSS 120B is callable without one.
Terminal, desktop or editor.
The same config file drives every interface the agent ships, so the endpoint is configured once for all of them.