Create API key link
cooper_create_api_key_linkUse this when the person needs an API key for this account, for example a ChatGPT, Claude, or Grok Bot user who signed in with OAuth and has no key for curl, a script, or another client. Requires auth: an OAuth session or a full-access API key. A restricted or inbox-scoped key gets HTTP 403 permission_denied. Optional input name (up to 80 characters) names the new key. Returns {object:"api_key_link", url, expires_at, single_use:true, key_name, note}. Give url to the person. They open it in a browser and press Create key to see one new full-access key, once. The key itself is never in this result, so it does not enter the chat. The link expires in 15 minutes and works once. Existing keys and OAuth connections keep working. Limited to 5 links per hour per account; more returns HTTP 429 with Retry-After. Same as POST /api/v1/keys/link.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cooper_create_api_key_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the new key. Defaults to "created from link". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Link to give the person. They open it in a browser and press Create key. | |
| note | No | What to tell the person. | |
| object | No | Always api_key_link. | |
| key_name | No | Name the new key will have. | |
| expires_at | No | ISO-8601 time the link stops working (15 minutes). | |
| single_use | No | Always true. The link works once. |