venice_delete_api_key
Remove an API key from the Venice AI platform to manage access and security by specifying the key ID.
Instructions
Delete an API key
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key_id | Yes | The API key ID to delete |
Implementation Reference
- src/tools/admin/index.ts:69-81 (registration)Registers the venice_delete_api_key MCP tool with its schema and inline handler function.server.tool( "venice_delete_api_key", "Delete an API key", { key_id: z.string().describe("The API key ID to delete") }, async ({ key_id }) => { const response = await veniceAPI(`/api_keys/${key_id}`, { method: "DELETE" }); if (!response.ok) { const data = await response.json() as { error?: { message?: string } }; return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; } return { content: [{ type: "text" as const, text: `✓ Deleted API key: ${key_id}` }] }; } );
- src/tools/admin/index.ts:73-79 (handler)The handler function executes the DELETE request to the Venice API to delete the specified API key and returns success or error message.async ({ key_id }) => { const response = await veniceAPI(`/api_keys/${key_id}`, { method: "DELETE" }); if (!response.ok) { const data = await response.json() as { error?: { message?: string } }; return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; } return { content: [{ type: "text" as const, text: `✓ Deleted API key: ${key_id}` }] };
- src/tools/admin/index.ts:72-72 (schema)Zod schema for the tool input parameter 'key_id'.{ key_id: z.string().describe("The API key ID to delete") },