Skip to main content
Glama

venice_retrieve_api_key

Retrieve details for a specific API key in Venice AI's system to manage access to AI capabilities like chat, image generation, and text-to-speech.

Instructions

Get details for a specific API key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_idYesThe API key ID to retrieve

Implementation Reference

  • Full tool handler implementation for 'venice_retrieve_api_key'. Registers the tool with schema for 'key_id' input, fetches details from Venice API endpoint `/api_keys/{key_id}`, and returns JSON data or error message.
    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) }] }; }
  • Input schema for the tool: requires 'key_id' as string.
    { key_id: z.string().describe("The API key ID to retrieve") },
  • Tool registration call within registerAdminTools function.
    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