Download OpenAPI specification:Download OpenAPI Spec (YAML)Download OpenAPI Spec (JSON)
シンプルAIサービスのAPIです。 このAPIは、シンプルAIサービスのリソースに対するCRUD操作を行います。
デフォルトWorkspaceに所属するAPIキーの一覧を取得します。 正式版リリース時に廃止します。GET /workspaces/{workspace_id}/api-keysを使用してください。
{- "api_keys": [
- {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
- "name": "Production API Key",
- "created_at": "2026-01-14T12:34:56Z",
- "tags": [
- "production",
- "team-a"
]
}
]
}新しいAPIキーをデフォルトWorkspaceに作成します。シークレットは作成時に一度だけ返却されます。 再度取得できないため、安全に保管してください。 正式版リリース時に廃止します。POST /workspaces/{workspace_id}/api-keysを使用してください。
| name required | string [ 1 .. 255 ] characters APIキーの名前 |
| tags | Array of strings <= 10 items [ items <= 32 characters ] APIキーに紐付けるタグ |
{- "name": "Production API Key",
- "tags": [
- "production",
- "team-a"
]
}{- "api_key": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
- "name": "Production API Key",
- "created_at": "2026-01-14T12:34:56Z",
- "tags": [
- "production",
- "team-a"
], - "secret": "sakura_simpleai_4My5bIlw53TBg0Tya4tVYbizxB8gKnSg6ZllH92lHW8="
}
}指定したAPIキーの情報を取得します(シークレットは除く)
| api_key_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 APIキーの識別子(UUID v4) |
{- "api_key": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
- "name": "Production API Key",
- "created_at": "2026-01-14T12:34:56Z",
- "tags": [
- "production",
- "team-a"
]
}
}既存のAPIキーの名前やタグを更新します
| api_key_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 APIキーの識別子(UUID v4) |
| name required | string [ 1 .. 255 ] characters APIキーの新しい名前 |
| tags required | Array of strings <= 10 items [ items <= 32 characters ] APIキーの新しいタグ |
{- "name": "Updated API Key",
- "tags": [
- "production",
- "team-b"
]
}{- "api_key": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
- "name": "Production API Key",
- "created_at": "2026-01-14T12:34:56Z",
- "tags": [
- "production",
- "team-a"
]
}
}APIキーを削除します
| api_key_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 APIキーの識別子(UUID v4) |
{- "is_fatal": true,
- "error_code": "unauthorized",
- "error_msg": "API key is invalid"
}指定したPlanの情報を取得します。
| plan_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Planの識別子(UUID v4) |
{- "plan": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "name": "Standard",
- "credit_limits": [
- {
- "category": "chat",
- "window_seconds": 3600,
- "credits": 100
}
]
}
}{- "workspaces": [
- {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "name": "Production Workspace",
- "plan": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "applied_at": "2026-01-14T12:34:56Z"
}, - "created_at": "2026-01-14T12:34:56Z"
}
]
}指定されたPlanを適用した新しいWorkspaceを作成します。
| plan_id required | string <uuid> 作成時に適用するPlanのID |
| name required | string [ 1 .. 255 ] characters Workspaceの名前 |
{- "plan_id": "00713021-9aea-41da-9a88-87760c08fa72",
- "name": "Production Workspace"
}{- "workspace": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "name": "Production Workspace",
- "plan": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "applied_at": "2026-01-14T12:34:56Z"
}, - "created_at": "2026-01-14T12:34:56Z"
}
}指定したWorkspaceの情報を取得します。
| workspace_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Workspaceの識別子(UUID v4) |
{- "workspace": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "name": "Production Workspace",
- "plan": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "applied_at": "2026-01-14T12:34:56Z"
}, - "created_at": "2026-01-14T12:34:56Z"
}
}指定したWorkspaceを更新します。
| workspace_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Workspaceの識別子(UUID v4) |
| name required | string [ 1 .. 255 ] characters Workspaceの名前 |
{- "name": "Production Workspace"
}{- "workspace": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "name": "Production Workspace",
- "plan": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "applied_at": "2026-01-14T12:34:56Z"
}, - "created_at": "2026-01-14T12:34:56Z"
}
}指定したWorkspaceを削除します。 有効なAPI Keyが残っている場合は削除できません。 CR版の間は、GET /api-keysおよびPOST /api-keysを提供するため、デフォルトWorkspaceを削除できません。
| workspace_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Workspaceの識別子(UUID v4) |
{- "is_fatal": true,
- "error_code": "unauthorized",
- "error_msg": "API key is invalid"
}Workspaceに適用するPlanを更新します。
| workspace_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Workspaceの識別子(UUID v4) |
| plan_id required | string <uuid> 更新先Planの識別子(UUID v4) |
{- "plan_id": "550e8400-e29b-41d4-a716-446655440000"
}{- "workspace": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "name": "Production Workspace",
- "plan": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "applied_at": "2026-01-14T12:34:56Z"
}, - "created_at": "2026-01-14T12:34:56Z"
}
}指定したWorkspaceに所属するAPIキーの一覧を取得します。
| workspace_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Workspaceの識別子(UUID v4) |
{- "api_keys": [
- {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
- "name": "Production API Key",
- "created_at": "2026-01-14T12:34:56Z",
- "tags": [
- "production",
- "team-a"
]
}
]
}指定したWorkspaceに新しいAPIキーを発行します。シークレットは発行時に一度だけ返却されます。 再度取得できないため、安全に保管してください。
| workspace_id required | string <uuid> Example: 550e8400-e29b-41d4-a716-446655440000 Workspaceの識別子(UUID v4) |
| name required | string [ 1 .. 255 ] characters APIキーの名前 |
| tags | Array of strings <= 10 items [ items <= 32 characters ] APIキーに紐付けるタグ |
{- "name": "Production API Key",
- "tags": [
- "production",
- "team-a"
]
}{- "api_key": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
- "name": "Production API Key",
- "created_at": "2026-01-14T12:34:56Z",
- "tags": [
- "production",
- "team-a"
], - "secret": "sakura_simpleai_4My5bIlw53TBg0Tya4tVYbizxB8gKnSg6ZllH92lHW8="
}
}