Create a read-only API key
create_api_keyGenerate a read-only API key so a website can read a project's published content. The key is returned once, so store it immediately.
Instructions
Mints the credential a website reads this project with. IMPORTANT: the response carries the whole key exactly once. Show it to the person and tell them to put it in their environment — it cannot be retrieved afterwards. The key is read-only and returns published content only, so it is safe in a server environment; it is NOT safe in browser code unless the project has an allowed-origins list configured. Prefer this over handing a site the agent token, which can write and delete. Requires the apikey.write grant.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"name": "<name>"
},
"name": "create_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What this key is for, so a list of them is readable a year later. | |
| projectId | Yes | The project id, as `prj_...`. |