lightning-llm-gateway

Call hosted LLMs from OpenAI, Anthropic, and Google via Lightning AI.

5|Updated Jul 3, 2026
One-click install
npx skills add https://github.com/Lightning-AI/skills --skill lightning-llm-gateway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lightning-llm-gateway
Source: https://github.com/Lightning-AI/skills/tree/main/lightning-llm-gateway
Command: npx skills add https://github.com/Lightning-AI/skills --skill lightning-llm-gateway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lightning-sdk.

What problem does it solve?

This skill solves the fragmentation of using multiple LLM providers by providing a single, unified interface for inference, billing, and model management through the Lightning AI platform.

Core Features & Use Cases

  • Unified Inference: Access models from OpenAI, Anthropic, Google, and open-weights providers via one consistent SDK.
  • Conversation Management: Handle multi-turn chat, streaming responses, and server-side conversation persistence.
  • Cost & Metadata Analysis: Retrieve real-time pricing, context limits, and model capabilities to optimize inference costs.
  • Use Case: Compare the performance and cost of different models like GPT-4o and Claude 3.5 Sonnet on the same prompt to determine the most efficient solution for a specific task.

Quick Start

Use the lightning-llm-gateway skill to chat with openai/gpt-4o using the teamspace my-org/my-teamspace.

Frequently Asked Questions about lightning-llm-gateway

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

FAQPage Schema
How do I call multiple LLM providers like OpenAI and Anthropic through a single API?

You can call OpenAI, Anthropic, Google, and open-weights models through a unified interface using the lightning-llm-gateway. It provides one consistent SDK for inference, handling multi-turn conversations and streaming responses across various providers.

Can I compare inference costs and context limits for GPT-4o and Claude 3.5 Sonnet?

You can compare inference costs and context limits for models like GPT-4o and Claude 3.5 Sonnet using the gateway. It retrieves real-time pricing, context limits, and model metadata so you can optimize inference costs on the same prompt.

Do I need lightning-sdk and teamspace authentication to manage LLM inference?

Yes, you need the lightning-sdk Python package and valid teamspace authentication to manage LLM inference. These prerequisites allow the gateway to execute inference requests and track usage costs through the Lightning AI platform.

What is the best way to handle multi-turn conversations and streaming responses across different hosted LLMs?

The best way to handle multi-turn conversations and streaming responses across hosted LLMs is using a unified API gateway. It manages server-side conversation persistence and streams responses consistently across providers like OpenAI, Anthropic, and Google.

Does the Lightning AI gateway support server-side conversation persistence for AI agents?

Yes, the gateway supports server-side conversation persistence for AI agents. It handles multi-turn chat sessions and streaming responses, allowing you to maintain conversation context seamlessly across different LLM providers.