venice_list_api_keys
Retrieve all API keys associated with your Venice AI account to manage access and permissions for AI model interactions.
Instructions
List all API keys on the account (requires admin API key)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/admin/index.ts:12-23 (handler)The handler function that executes the tool logic: fetches API keys via veniceAPI, processes the response, handles errors, and returns a formatted text list of keys.async () => { const response = await veniceAPI("/api_keys"); const data = await response.json() as APIKeysResponse; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; const keys = data.data || []; const list = keys.map((k) => { const created = k.createdAt || k.created_at || "?"; const name = k.name || k.description || "Unnamed"; return `- ${name} (${k.id}) - created: ${created.split("T")[0]}`; }).join("\n"); return { content: [{ type: "text" as const, text: `API Keys (${keys.length}):\n${list}` }] }; }
- src/tools/admin/index.ts:8-24 (registration)Registration of the 'venice_list_api_keys' tool on the McpServer instance within the registerAdminTools function.server.tool( "venice_list_api_keys", "List all API keys on the account (requires admin API key)", {}, async () => { const response = await veniceAPI("/api_keys"); const data = await response.json() as APIKeysResponse; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; const keys = data.data || []; const list = keys.map((k) => { const created = k.createdAt || k.created_at || "?"; const name = k.name || k.description || "Unnamed"; return `- ${name} (${k.id}) - created: ${created.split("T")[0]}`; }).join("\n"); return { content: [{ type: "text" as const, text: `API Keys (${keys.length}):\n${list}` }] }; } );