---
title: "Get provider"
method: GET
path: "/api/provider/{providerID}"
tags: ["provider"]
---

# Get provider

`GET /api/provider/{providerID}`

## Request

- Base URL: `https://opencode.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://opencode.ai/api/provider/{providerID}`
- Auth: none required

Retrieve a single AI provider so clients can inspect its availability and endpoint settings.

## Path parameters

- `providerID` string, required

## Query parameters

- `location` object, nullable
  - `directory` string, nullable

## Response `200`

Success

- object
  - `location` LocationPublicRef, required
    - `directory` string, required
  - `data` ProviderInfo, required
    - `id` string, required
    - `canonical` string
    - `integrationID` string
    - `name` string, required
    - `activation` 'auto' | 'enabled' | 'disabled', required
    - `package` string, required
    - `compatibility` ProviderCompatibility
      - `reasoningField` union
        - 'reasoning' | 'reasoning_content' | 'reasoning_text'
        - string
      - `requireReasoning` boolean
      - `maxTokensField` 'max_completion_tokens' | 'max_tokens'
      - `requireFinishReason` boolean
      - `requireAssistantAfterTool` boolean
      - `supportsPromptCacheKey` boolean
      - `streamUsage` boolean
      - `cacheFormat` 'anthropic' | 'alibaba'
      - `mediaInput` 'assets' | 'state' | 'root'
    - `settings` ProviderSettings
      - `timeout` union
        - number
        - false
      - `headerTimeout` union
        - number
        - false
      - `chunkTimeout` union
        - number
        - false
      - `compaction` union
        - object
          - `type` 'summary', required
        - object
          - `type` 'native', required
      - `cache` ProviderCache
        - `ttl` string
      - `transport` 'http' | 'websocket'
      - `encoding` 'zstd' | 'gzip' | 'none'
    - `headers` object
    - `body` object

## Other responses

- `400`: InvalidRequestError
- `401`: UnauthorizedError
- `404`: ProviderNotFoundError | LocationNotFoundError
- `503`: ServiceUnavailableError

## Changes

> 50 revisions in range; 1 not diffed.

- **2026-10-27** `d6d739fceba2`: 1 info
  - added the optional property `data/compatibility/mediaInput` to the response with the `200` status
- **2026-10-26** `612fd3a75a0b`: 1 info
  - added the optional property `data/settings/cache` to the response with the `200` status
- **2026-10-20** `7e00fc7f9cae`: 1 info
  - added the optional property `data/compatibility/streamUsage` to the response with the `200` status

[Operation history](https://skmtc.dev/kaaass/apis/opencode/changes/api/provider/:providerID/get.md)

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) - [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) - [OpenAPI document](https://skmtc.dev/kaaass/apis/opencode/revisions/4e083d954707?raw)
