---
title: Discovery API 參考
description: Platform API v1 的 Discovery：每個操作的路徑、參數、請求與回應欄位、scope、冪等與錯誤，直接取自 API 合約。
url: https://agentlab.cresclab.com/docs/zh-tw/api/discovery
language: zh-Hant
updated: 2026-12-05
---

# Discovery API 參考

Platform API v1 的 Discovery：每個操作的路徑、參數、請求與回應欄位、scope、冪等與錯誤，直接取自 API 合約。

> [!NOTE]
> 由 API 合約（Agent Lab Platform API 1.0.0-alpha.1）產生。說明文字是合約的英文原文。

Public documents a client reads before it can authenticate.

## This document, as JSON

`GET /v1/openapi.json`

| Scope | 身分 | 驗證方式 | Idempotency-Key |
| --- | --- | --- | --- |
| 無 | — | 無 | — |

### 回應

| 狀態碼 | 內容 | 說明 |
| --- | --- | --- |
| `200` | `application/json`: `object` | The OpenAPI document this server conforms to. |
| `503` | `application/json`: [Error](https://agentlab.cresclab.com/docs/zh-tw/api/schemas.md#Error) | Try again later (`recovery: retry`). |

#### `200` `application/json`

| 欄位 | 型別 | 必填 | 說明 |
| --- | --- | --- | --- |
| `openapi` | `string` | 是 | — |
| `info` | `object` | 是 | — |
| `paths` | `object` | 是 | — |

## OpenID Connect discovery

`GET /.well-known/openid-configuration`

Issuer, endpoints and the rules an OpenID relying party reads. Any origin may read it.

| Scope | 身分 | 驗證方式 | Idempotency-Key |
| --- | --- | --- | --- |
| 無 | — | 無 | — |

### 回應

| 狀態碼 | 內容 | 說明 |
| --- | --- | --- |
| `200` | `application/json`: [OpenIDConfiguration](https://agentlab.cresclab.com/docs/zh-tw/api/schemas.md#OpenIDConfiguration) | The provider metadata. |

## OAuth authorization server metadata (RFC 8414)

`GET /.well-known/oauth-authorization-server`

| Scope | 身分 | 驗證方式 | Idempotency-Key |
| --- | --- | --- | --- |
| 無 | — | 無 | — |

### 回應

| 狀態碼 | 內容 | 說明 |
| --- | --- | --- |
| `200` | `application/json`: [AuthorizationServerMetadata](https://agentlab.cresclab.com/docs/zh-tw/api/schemas.md#AuthorizationServerMetadata) | The authorization server metadata. |

## The key that signs channel event deliveries

`GET /.well-known/agentlab-sdk-event-key.json`

The public half of the Ed25519 key that signs `sdk-event/v1` deliveries
(`agentlab-sdk-event-v1-ed25519`). Cached for five minutes. When event delivery is not
configured the answer is 503, never an empty key a client could cache as valid.

| Scope | 身分 | 驗證方式 | Idempotency-Key |
| --- | --- | --- | --- |
| 無 | — | 無 | — |

### 回應

| 狀態碼 | 內容 | 說明 |
| --- | --- | --- |
| `200` | `application/json`: [SdkEventVerificationKey](https://agentlab.cresclab.com/docs/zh-tw/api/schemas.md#SdkEventVerificationKey) | The verification key. |
| `503` | `application/json`: [LegacyErrorString](https://agentlab.cresclab.com/docs/zh-tw/api/schemas.md#LegacyErrorString) | Event delivery is not configured on this server. |
