Skip to main content
Glama

venice_retrieve_api_key

Retrieve details for a specific API key by providing its ID, enabling management of access credentials within the Venice AI platform.

Instructions

Get details for a specific API key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_idYesThe API key ID to retrieve

Implementation Reference

  • Handler function for the 'venice_retrieve_api_key' tool. It takes a key_id parameter, makes an API call to `/api_keys/${key_id}` using veniceAPI, and returns the API key details as formatted JSON or an error message.
    async ({ key_id }) => { const response = await veniceAPI(`/api_keys/${key_id}`); const data = await response.json() as { data?: Record<string, unknown>; error?: { message?: string } }; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] }; }
  • Input schema for the 'venice_retrieve_api_key' tool defining the required 'key_id' parameter as a string.
    { key_id: z.string().describe("The API key ID to retrieve") },
  • Registration of the 'venice_retrieve_api_key' tool in the registerAdminTools function using McpServer.tool method.
    server.tool( "venice_retrieve_api_key", "Get details for a specific API key", { key_id: z.string().describe("The API key ID to retrieve") }, async ({ key_id }) => { const response = await veniceAPI(`/api_keys/${key_id}`); const data = await response.json() as { data?: Record<string, unknown>; error?: { message?: string } }; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; return { content: [{ type: "text" as const, text: JSON.stringify(data.data, null, 2) }] }; } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/georgeglarson/venice-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server