Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
{
"group": "Models",
"pages": [
"rest/models/get-v1models"
"rest/models/get-v1public-model-registry-models"
]
}
]
Expand Down
6 changes: 0 additions & 6 deletions docs/rest/models/get-v1models.mdx

This file was deleted.

10 changes: 10 additions & 0 deletions docs/rest/models/get-v1public-model-registry-models.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Get Model Registry"
sidebarTitle: "Get All Available Models"
description: "Returns all models and endpoints supported by the Helicone AI Gateway"
openapi: get /v1/public/model-registry/models
---

This endpoint returns the complete catalog of AI models and provider endpoints that the Helicone AI Gateway can route to. The gateway uses this registry to determine which providers support a requested model and how to intelligently route requests for maximum reliability and cost optimization.

When you request a model through the AI Gateway (like `gpt-4o-mini`), the gateway consults this registry to find all providers offering that model, then applies routing logic to select the best provider based on your configuration, availability, and pricing.
64 changes: 63 additions & 1 deletion valhalla/jawn/src/controllers/public/modelRegistryController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller, Get, Route, Tags } from "tsoa";
import { Controller, Get, Route, Tags, Example } from "tsoa";
import { err, ok, Result } from "../../packages/common/result";
import { registry } from "../../../../../packages/cost/models/registry";
import { getProviderDisplayName } from "../../../../../packages/cost/models/provider-helpers";
Expand Down Expand Up @@ -82,7 +82,69 @@ export class ModelRegistryController extends Controller {
return slugMap[provider.toLowerCase()] || provider.toLowerCase();
}

/**
* Get all available models from the registry
* @summary Returns a comprehensive list of all AI models with their configurations, pricing, and capabilities
* @description This endpoint provides detailed information about all available models including:
* - Model metadata (name, author, context length, training date)
* - Supported providers and endpoints
* - Pricing information (per million tokens for prompt/completion/special features)
* - Input/output modalities (text, image, audio, video)
* - Supported parameters (temperature, max_tokens, etc.)
* - Available capabilities (audio, video, image, thinking, web_search, caching)
*
* No authentication required - this is a public endpoint.
*
* @returns {ModelRegistryResponse} Complete model registry with models and filter options
*/
@Get("/models")
@Example<ModelRegistryResponse>({
models: [
{
id: "claude-opus-4-1",
name: "Anthropic: Claude Opus 4.1",
author: "anthropic",
contextLength: 200000,
endpoints: [
{
provider: "anthropic",
providerSlug: "anthropic",
supportsPtb: true,
pricing: {
prompt: 15,
completion: 75,
cacheRead: 1.5,
cacheWrite: 18.75,
},
},
],
maxOutput: 32000,
trainingDate: "2025-08-05",
description: "Most capable Claude model with extended context",
inputModalities: ["text" as InputModality],
outputModalities: ["text" as OutputModality],
supportedParameters: [
"max_tokens" as StandardParameter,
"temperature" as StandardParameter,
"stop" as StandardParameter,
"reasoning" as StandardParameter,
"include_reasoning" as StandardParameter,
"tools" as StandardParameter,
"tool_choice" as StandardParameter,
],
},
],
total: 150,
filters: {
providers: [
{ name: "anthropic", displayName: "Anthropic" },
{ name: "openai", displayName: "OpenAI" },
{ name: "google", displayName: "Google" },
],
authors: ["anthropic", "openai", "google", "meta"],
capabilities: ["audio", "image", "thinking", "caching", "reasoning"],
},
})
public async getModelRegistry(): Promise<
Result<ModelRegistryResponse, string>
> {
Expand Down
Loading