---
title: "创建 OhMyAgent API Key"
method: POST
path: "/api/v1/users/ohmyagent/api-keys"
tags: ["【用户】OhMyAgent"]
---

# 创建 OhMyAgent API Key

`POST /api/v1/users/ohmyagent/api-keys`

创建当前用户的模型无关 OhMyAgent 代理 Key。请求无需模型参数；使用时在 LLM 请求的 model 字段传模型配置 ID。API Key 与签名 Secret 仅在创建响应中返回。

## Response `200`

成功

- object
  - `code` integer
  - `data` DomainCreateOhMyAgentAPIKeyResp
    - `api_key` string
    - `created_at` integer
    - `id` string
    - `signing_secret` string
  - `message` string

## Other responses

- `401` — 未授权
- `500` — 服务器内部错误

---

[API](https://skmtc.net/chaitin/apis/untitled-api.md) · [All operations](https://skmtc.net/chaitin/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chaitin/untitled-api/revisions/5a5929cb17f2/schema)
