跳到正文
API 参考
API 参考

获取当前账户

获取当前 API 密钥可访问的用户和账户上下文。

获取当前 API 密钥可访问的用户和账户上下文。

端点

GET /api/v1/me
基础 URL
https://runapi.ai
API 版本
v1
身份验证
Authorization: Bearer YOUR_API_KEY
02

成功响应

HTTP 200

GET /api/v1/me

JSON
{
  "account": {
    "id": 7,
    "name": "Example Studio"
  },
  "email": "[email protected]",
  "id": 42,
  "name": "Ada"
}
03

错误响应 (401)

HTTP 401
响应 Schema
JSON
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

响应示例

JSON
{
  "error": "Authentication required"
}
04

错误响应 (403)

HTTP 403
响应 Schema
JSON
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}

响应示例

JSON
{
  "error": "Standard API key required"
}
05

cURL 示例

CURL
curl -X GET https://runapi.ai/api/v1/me \
  -H 'Authorization: Bearer YOUR_API_KEY'