LLM Gateway

Quickstart

Fastest way to start using LLM Gateway in any language or framework.

Welcome to LLM Gateway—a single drop‑in endpoint that lets you call today’s best large‑language models while keeping your existing code and development workflow intact.

TL;DR — Point your HTTP requests to https://llm-gw.agenzo.com/v1/…, supply your LLM_GATEWAY_API_KEY, and you’re done.


1 · Get an API key

  1. Sign in to the dashboard.
  2. Create a new Project → Copy the key.
  3. Export it in your shell (or a .env file):
export LLM_GATEWAY_API_KEY="llmgtwy_XXXXXXXXXXXXXXXX"

2 · Supported models

Pass one of the model strings below in the model field. Two channels are available:

Custom channel (kiro/)

Multi-provider aggregated models with intelligent routing and load balancing.

ModelModel string
Claude Opus 5kiro/claude-opus-5
Claude Opus 4.8kiro/claude-opus-4.8
Claude Opus 4.7kiro/claude-opus-4.7
Claude Opus 4.6kiro/claude-opus-4.6
Claude Opus 4.5kiro/claude-opus-4.5
Claude Sonnet 5kiro/claude-sonnet-5
Claude Sonnet 4.6kiro/claude-sonnet-4.6
Claude Sonnet 4.5kiro/claude-sonnet-4.5
Claude Sonnet 4kiro/claude-sonnet-4
Claude Haiku 4.5kiro/claude-haiku-4.5
GPT-5.6 Solkiro/gpt-5.6-sol
GPT-5.6 Terrakiro/gpt-5.6-terra
GPT-5.6 Lunakiro/gpt-5.6-luna
DeepSeek 3.2kiro/deepseek-3.2
MiniMax M2.5kiro/minimax-m2.5
MiniMax M2.1kiro/minimax-m2.1

AWS Bedrock channel (aws-bedrock/)

OpenAI-compatible chat, embedding, rerank, and transcription models served through Amazon Bedrock.

ModelModel string
Claude Sonnet 5aws-bedrock/claude-sonnet-5
Claude Sonnet 4.6aws-bedrock/claude-sonnet-4-6
Claude Sonnet 4.5aws-bedrock/claude-sonnet-4-5
Claude Haiku 4.5aws-bedrock/claude-haiku-4-5
Claude Opus 5aws-bedrock/claude-opus-5
Claude Opus 4.8aws-bedrock/claude-opus-4-8
Claude Opus 4.7aws-bedrock/claude-opus-4-7
Claude Opus 4.6aws-bedrock/claude-opus-4-6
Amazon Nova Proaws-bedrock/amazon-nova-pro
Amazon Nova Liteaws-bedrock/amazon-nova-lite
Amazon Nova Microaws-bedrock/amazon-nova-micro
Amazon Titan Embed v2aws-bedrock/amazon-titan-embed-text-v2
Cohere Rerank v3.5aws-bedrock/cohere-rerank-v3-5
Amazon Rerank v1aws-bedrock/amazon-rerank-v1

3 · Pick your language

curl -X POST https://llm-gw.agenzo.com/v1/chat/completions \-H "Content-Type: application/json" \-H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \-d '{"model": "aws-bedrock/claude-haiku-4-5","messages": [  {"role": "user", "content": "Hello, how are you?"}]}'
const response = await fetch('https://llm-gw.agenzo.com/v1/chat/completions', {method: 'POST',headers: {  'Content-Type': 'application/json',  'Authorization': `Bearer ${process.env.LLM_GATEWAY_API_KEY}`},body: JSON.stringify({  model: 'aws-bedrock/claude-haiku-4-5',  messages: [    { role: 'user', content: 'Hello, how are you?' }  ]})});if (!response.ok) {throw new Error(`HTTP error! status: ${response.status}`);}const data = await response.json();console.log(data.choices[0].message.content);
import { useState } from 'react'function ChatComponent() {const [response, setResponse] = useState('');const [loading, setLoading] = useState(false);const sendMessage = async () => {setLoading(true);try {const res = await fetch('https://llm-gw.agenzo.com/v1/chat/completions', {method: 'POST',headers: {'Content-Type': 'application/json','Authorization': `Bearer ${process.env.REACT_APP_LLM_GATEWAY_API_KEY}`},body: JSON.stringify({model: 'aws-bedrock/claude-haiku-4-5',messages: [{ role: 'user', content: 'Hello, how are you?' }]})});    if (!res.ok) {      throw new Error(`HTTP error! status: ${res.status}`);    }    const data = await res.json();    setResponse(data.choices[0].message.content);  } catch (error) {    console.error('Error:', error);  } finally {    setLoading(false);  }};return (<div><button onClick={sendMessage} disabled={loading}>	{loading ? "Sending..." : "Send Message"}</button>{response && <p>{response}</p>}</div>); }export default ChatComponent;
; // app/api/chat/route.tsimport { NextRequest, NextResponse } from "next/server";export async function POST(request: NextRequest) {const { message } = await request.json();const response = await fetch('https://llm-gw.agenzo.com/v1/chat/completions', {method: 'POST',headers: {'Content-Type': 'application/json','Authorization': `Bearer ${process.env.LLM_GATEWAY_API_KEY}`},body: JSON.stringify({model: 'aws-bedrock/claude-haiku-4-5',messages: [{ role: 'user', content: message }]})});if (!response.ok) {return NextResponse.json({ error: 'Failed to get response' }, { status: response.status });}const data = await response.json();return NextResponse.json({message: data.choices[0].message.content});}// Usage in component:// const response = await fetch('/api/chat', {// method: 'POST',// headers: { 'Content-Type': 'application/json' },// body: JSON.stringify({ message: 'Hello, how are you?' })// });
import requestsimport osresponse = requests.post('https://llm-gw.agenzo.com/v1/chat/completions',headers={'Content-Type': 'application/json','Authorization': f'Bearer {os.getenv("LLM_GATEWAY_API_KEY")}'},json={'model': 'aws-bedrock/claude-haiku-4-5','messages': [{'role': 'user', 'content': 'Hello, how are you?'}]})response.raise_for_status()print(response.json()['choices'][0]['message']['content'])
import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.URI;String apiKey = System.getenv("LLM_GATEWAY_API_KEY");String requestBody = """{"model": "aws-bedrock/claude-haiku-4-5","messages": [{"role": "user", "content": "Hello, how are you?"}]}""";HttpRequest request = HttpRequest.newBuilder().uri(URI.create("https://llm-gw.agenzo.com/v1/chat/completions")).header("Content-Type", "application/json").header("Authorization", "Bearer " + apiKey).POST(HttpRequest.BodyPublishers.ofString(requestBody)).build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());
use reqwest::Client;use serde_json::json;use std::env;#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> {let client = Client::new();let api_key = env::var("LLM_GATEWAY_API_KEY")?;  let response = client      .post("https://llm-gw.agenzo.com/v1/chat/completions")      .header("Content-Type", "application/json")      .header("Authorization", format!("Bearer {}", api_key))      .json(&json!({          "model": "aws-bedrock/claude-haiku-4-5",          "messages": [              {"role": "user", "content": "Hello, how are you?"}          ]      }))      .send()      .await?;  let result: serde_json::Value = response.json().await?;  println!("{}", result["choices"][0]["message"]["content"]);  Ok(())}
package mainimport (  "bytes"  "encoding/json"  "fmt"  "net/http"  "os")type ChatRequest struct {Model string `json:"model"`Messages []Message `json:"messages"`}type Message struct {Role string `json:"role"`Content string `json:"content"`}func main() {apiKey := os.Getenv("LLM_GATEWAY_API_KEY")  requestBody := ChatRequest{      Model: "aws-bedrock/claude-haiku-4-5",      Messages: []Message{{Role: "user", Content: "Hello, how are you?"}},  }  jsonData, _ := json.Marshal(requestBody)  req, _ := http.NewRequest("POST", "https://llm-gw.agenzo.com/v1/chat/completions", bytes.NewBuffer(jsonData))  req.Header.Set("Content-Type", "application/json")  req.Header.Set("Authorization", "Bearer "+apiKey)  client := &http.Client{}  resp, _ := client.Do(req)  defer resp.Body.Close()  fmt.Println("Response received")}
<?php$apiKey = $_ENV['LLM_GATEWAY_API_KEY'];$data = ['model' => 'aws-bedrock/claude-haiku-4-5','messages' => [['role' => 'user', 'content' => 'Hello, how are you?']]];$options = [  'http' => [      'header' => [          'Content-Type: application/json',          'Authorization: Bearer ' . $apiKey      ],      'method' => 'POST',      'content' => json_encode($data)]];$context = stream_context_create($options);$response = file_get_contents('https://llm-gw.agenzo.com/v1/chat/completions',false,$context);if ($response === FALSE) {throw new Exception('Request failed');}$result = json_decode($response, true);echo $result['choices'][0]['message']['content'];?>
require 'net/http'require 'json'require 'uri'uri = URI('https://llm-gw.agenzo.com/v1/chat/completions')http = Net::HTTP.new(uri.host, uri.port)http.use_ssl = truerequest = Net::HTTP::Post.new(uri)request['Content-Type'] = 'application/json'request['Authorization'] = "Bearer #{ENV['LLM_GATEWAY_API_KEY']}"request.body = {model: 'aws-bedrock/claude-haiku-4-5',messages: [{ role: 'user', content: 'Hello, how are you?' }]}.to_jsonresponse = http.request(request)if response.code != '200'raise "HTTP Error: #{response.code}"endresult = JSON.parse(response.body)puts result['choices'][0]['message']['content']

4 · SDK integrations

ai-sdk.ts
import { llmgateway } from "@llmgateway/ai-sdk-provider";
import { generateText } from "ai";

const { text } = await generateText({
	model: llmgateway("aws-bedrock/claude-haiku-4-5"),
	prompt: "Write a vegetarian lasagna recipe for 4 people.",
});
vercel-ai-sdk.ts
import { createOpenAI } from "@ai-sdk/openai";

const llmgateway = createOpenAI({
	baseURL: "https://llm-gw.agenzo.com/v1",
	apiKey: process.env.LLM_GATEWAY_API_KEY!,
});

const completion = await llmgateway.chat({
	model: "aws-bedrock/claude-haiku-4-5",
	messages: [{ role: "user", content: "Hello, how are you?" }],
});

console.log(completion.choices[0].message.content);
openai-sdk.ts
import OpenAI from "openai";

const openai = new OpenAI({
	baseURL: "https://llm-gw.agenzo.com/v1",
	apiKey: process.env.LLM_GATEWAY_API_KEY,
});

const completion = await openai.chat.completions.create({
	model: "aws-bedrock/claude-haiku-4-5",
	messages: [{ role: "user", content: "Hello, how are you?" }],
});

console.log(completion.choices[0].message.content);

5 · Going further

  • Streaming: pass stream: true to any request—Gateway will proxy the event stream unchanged.
  • Monitoring: Every call appears in the dashboard with latency, cost & provider breakdown.

How is this guide?

Last updated on

On this page