ai-gateway

Route AI requests to Claude, Gemini, and MiniMax with cost logging.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/MuhamadTAH/Pird --skill ai-gateway-muhamadtah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-gateway
Source: https://github.com/MuhamadTAH/Pird/tree/main/.claude/skills/ai-gateway
Command: npx skills add https://github.com/MuhamadTAH/Pird --skill ai-gateway-muhamadtah

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill centralizes AI functionality, ensuring all services can access Claude, Gemini, and MiniMax without holding API keys or directly interacting with AI providers, simplifying provider swaps and logging.

Core Features & Use Cases

  • Centralized AI Access: One service for all AI requests, reducing complexity.
  • Endpoint Routing: Routes to appropriate AI providers based on context.
  • System Prompt Management: Manages system prompts for each context.
  • Cost Logging: Tracks and logs AI usage costs for monitoring.
  • New AI Capability Addition: Step-by-step guide for adding new AI capabilities.
  • Use Case: When a new service needs an AI capability, it can use this Skill to integrate without handling AI providers directly.

Quick Start

Load the 'ai-gateway' skill and make an AI request using the '/ai/chat' endpoint with the appropriate context.

Frequently Asked Questions about ai-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize AI service access for Claude, Gemini, and MiniMax without managing API keys in each service?

Centralize AI service access by using a unified gateway that routes requests to Claude, Gemini, and MiniMax based on context. This allows downstream services to integrate AI capabilities without holding API keys or directly interacting with AI providers.

What is the best way to track and log AI usage costs across multiple AI providers?

Track and log AI usage costs by routing all AI requests through a centralized gateway. The gateway monitors requests to providers like Claude and Gemini, automatically logging usage costs for comprehensive cost tracking and system monitoring.

How do I route AI requests to different providers based on the application context?

Route AI requests to different providers by evaluating the request context against predefined routing rules. The gateway determines the appropriate AI provider for each specific context and dynamically directs the request accordingly.

Can I manage system prompts for multiple AI contexts without hardcoding them into individual services?

Yes, you can manage system prompts centrally without hardcoding. A centralized AI gateway handles system prompt management for each specific context, ensuring consistent prompt application across all requesting services.

How do I add new AI capabilities to a complex system already using multiple AI providers?

Add new AI capabilities by following the provided step-by-step guide within the gateway. New services simply make requests to the gateway endpoint, integrating the new capability without needing to handle AI providers directly.

Does centralized AI provider management work for complex systems requiring extensive AI integration?

Yes, centralized AI provider management is designed specifically for complex systems requiring AI integration. It simplifies provider swaps and logging by acting as the single entry point for all AI requests.