Skip to content
Console docs
Console model list

Model list API

There are two kinds of model list. The Console list returns everything a workspace can use, including the providers it connected. The inference lists return the public OpenCode Models and Go catalogs in OpenAI’s list shape.

ListReturnsKey
/console/api/v1/modelsEvery provider and model the caller can use, with the workspace’s edits applied.Required
/inference/v1/modelsOpenCode Models. Every public model without a key; with one, the models its workspace can use.Optional
/inference/go/v1/modelsGo models, in the same shapes.Optional

Use the Console list when your client should offer the same models OpenCode does, connected providers included. Use an inference list when you only need OpenCode Models or Go, or when you have no key yet and want the public catalog.

GET https://opencode.ai/console/api/v1/models returns every provider the caller can use, and under each the models it can call.

Terminal
curl --fail-with-body "https://opencode.ai/console/api/v1/models" \
  --header "Authorization: Bearer oc_sk_..."

Any workspace member can call it: from a browser session, an OpenCode login, a personal API key, or a service account key with Models › Read. It uses the same rules as the OpenCode config Console generates, so the list matches what /models shows in OpenCode. The response is never cached (Cache-Control: private, no-store).

The response is an object keyed by provider ID, which is the ID OpenCode uses.

Provider IDProvider
opencodeOpenCode Models, paid from workspace credits.
opencode-goGo models. Only present with a Go subscription.
console-<connection slug>A connection the workspace added, such as console-openai, console-anthropic, or console-aws-bedrock.

Each provider has id, name, and models. name is the name OpenCode shows, usually the workspace name followed by the provider name. models is an object keyed by model ID.

Trimmed to one provider and one model:

JSON
{
  "opencode": {
    "id": "opencode",
    "name": "Acme Inc. / OpenCode",
    "models": {
      "claude-sonnet-5-5": {
        "type": "chat",
        "id": "claude-sonnet-5-5",
        "canonical_id": "anthropic/claude-sonnet-5-5",
        "name": "Claude Sonnet 5.5",
        "description": "Fast Claude model for everyday coding, agents, and knowledge work",
        "family": "claude-sonnet",
        "open_weights": false,
        "knowledge": "2026-06",
        "release_date": "2026-09-28",
        "last_updated": "2026-09-28",
        "modalities": {
          "input": ["text", "image/jpeg", "image/png", "application/pdf"],
          "output": ["text"]
        },
        "capabilities": {
          "tools": { "supported": true },
          "reasoning": {
            "supported": true,
            "effort": ["low", "medium", "high", "xhigh", "max"]
          }
        },
        "limit": {
          "context": 1000000,
          "output": 128000
        },
        "cost": {
          "text": {
            "input": {
              "price": 2,
              "cache": { "read": 0.1, "write": 2.5 }
            },
            "output": { "price": 10 }
          }
        },
        "api": {
          "messages": {
            "base_url": "https://opencode.ai/inference/anthropic/v1",
            "sdk": {
              "aisdk": "@ai-sdk/anthropic",
              "opencodeai": "@opencode/ai/providers/anthropic"
            }
          }
        }
      }
    }
  }
}

Each model is models.dev’s v2 entry with the workspace’s edits applied, so the fields are the ones models.dev publishes. Disabled models, and models that models.dev marks deprecated, are left out.

FieldMeaning
typeThe kind of model. Only chat is listed for now; decision, voice, and image models may be added later.
idThe model ID to send in requests. It is also the key in models.
nameDisplay name.
limitcontext is the context window. input caps a request’s input when the model sets one. output caps the response.
costUS dollars per 1M tokens: text.input.price, text.input.cache.read, text.input.cache.write, and text.output.price. 0 means free. Missing cache fields mean the model has no cache price. Some models add cost.multipliers, which raise the price at the times they name.
capabilitiesWhat the model can do, such as tool calls and reasoning effort.
modalitiesAccepted input types, such as text, image/png, or application/pdf, and output types.
apiThe Console URL and SDK to use for this model. See Model API.

api has one entry, keyed by the protocol the model speaks: chat-completions for OpenAI Chat Completions, responses for OpenAI Responses, messages for Anthropic Messages, and generate-content for Gemini. It is the protocol’s models.dev entry with the vendor’s URL replaced by Console’s, and the other protocols left out.

FieldMeaning
base_urlWhere to send requests for this model. OpenCode Models use https://opencode.ai/inference/..., Go uses https://opencode.ai/inference/go/..., and a connection uses its Console API URL, https://opencode.ai/inference/custom/<connection_id>.
sdk.aisdkThe AI SDK package for the protocol, the same one in the model endpoints table.
sdk.opencodeaiThe matching provider module OpenCode loads.

A model on a connection you added looks like this. Append the protocol’s path, such as /chat/completions or /responses, as described in the Providers API.

JSON
"api": {
  "responses": {
    "base_url": "https://opencode.ai/inference/custom/conn_...",
    "sdk": {
      "aisdk": "@ai-sdk/openai",
      "opencodeai": "@opencode/ai/providers/openai/responses"
    }
  }
}

GET https://opencode.ai/inference/v1/models lists OpenCode Models, and GET https://opencode.ai/inference/go/v1/models lists Go models. Both return OpenAI’s list shape.

Terminal
curl https://opencode.ai/inference/v1/models

Trimmed to one model and its common fields:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "claude-sonnet-5-5",
      "object": "model",
      "created": 1795006281,
      "owned_by": "opencode",
      "name": "Claude Sonnet 5.5",
      "type": "chat",
      "limit": { "context": 1000000, "output": 128000 },
      "cost": {
        "text": {
          "input": { "price": 2, "cache": { "read": 0.1, "write": 2.5 } },
          "output": { "price": 10 }
        }
      }
    }
  ]
}

Without a key, a list has every public model. With a key, it has only the models that key’s workspace can use, so a service account key needs Models › Read. Send it in Authorization: Bearer or x-api-key. Only chat models are listed, and models that are private or deprecated are left out.

Each item starts with OpenAI’s id, object, created, and owned_by, then the same models.dev fields the Console list uses: name, type, limit, cost, capabilities, modalities, api, family, release_date, and others. Unlike the Console list, the inference lists don’t include the workspace’s connections. If models.dev data is temporarily unavailable, items still appear with only OpenAI’s fields, and name equals the ID.

Each Go model also has go: its monthly usage limit on each plan (monthly_usage), whether it trains on requests (training), whether it retains none of your data (zdr), and whether some countries are refused it (limited_regions).

StatusMeaning
401No credentials, or an expired or revoked key.
403The key can’t list models. Service account and restricted keys need Models › Read.