API Reference

GET /v1/models

List the catalog. Pricing, capabilities, modalities, context windows.

FIG.
FIG. 00 · GET /V1/MODELSGET /v1/models

Discover what models your project can call, with full pricing and capability metadata. The same catalog backs the model picker in the dashboard and the model id you pass to the AI SDK's streamText.

FIG. 01CATALOG SHAPE
SCHEMATIC
`GET /v1/models` returns the full list with pricing and tags; the per-model `/endpoints` route returns provider-by-provider latency, throughput, uptime, and supported parameters. Use them to filter, route, or surface model details in your own UI.

List models

GET https://synapse.garden/api/v1/models

Returns every model the catalog currently exposes. Filter client-side by type (language / embedding / reranking / image / video).

Response

{
  "object": "list",
  "data": [
    {
      "id": "openai/gpt-5.4",
      "object": "model",
      "created": 1740009600,
      "released": 1740009600,
      "owned_by": "openai",
      "name": "gpt-5.4",
      "description": "Workhorse model. Reasoning, tools, structured output.",
      "context_window": 1100000,
      "max_tokens": 32768,
      "type": "language",
      "tags": ["file-input", "tool-use", "reasoning", "vision"],
      "pricing": {
        "input": "0.0000025",
        "output": "0.0000150",
        "input_cache_read": "0.00000025",
        "input_cache_write": "0.0000031"
      }
    },
    ...
  ]
}

Pricing values are USD per single token (decimal string). Multiply by 1,000,000 for the per-million rate.

Tags vocabulary

Common values in tags:

TagMeaning
file-inputAccepts file uploads (PDF, etc.)
tool-useSupports function calling
reasoningChain-of-thought / extended thinking
visionAccepts image input
audioAccepts audio input
web-searchNative web search capability
multilingualStrong on non-English languages
codeOptimized for code

Get a single model

GET https://synapse.garden/api/v1/models/{creator}/{model}

Returns the same shape as a list entry, plus richer metadata.

Example

curl https://synapse.garden/api/v1/models/openai/gpt-5.4 \
  -H "Authorization: Bearer $MG_KEY"

List provider endpoints for a model

GET https://synapse.garden/api/v1/models/{creator}/{model}/endpoints

For models hosted by multiple providers (e.g. Claude on Anthropic + Bedrock + Vertex), this returns per-provider details:

  • Pricing per provider (sometimes differs)
  • Context length per provider
  • Latency / throughput / uptime metrics
  • Supported parameters per provider

Response shape

{
  "data": {
    "id": "anthropic/claude-opus-4.6",
    "name": "Claude Opus 4.6",
    "architecture": {
      "modality": "text+image+file→text",
      "input_modalities": ["text", "image", "file"],
      "output_modalities": ["text"]
    },
    "endpoints": [
      {
        "provider_name": "anthropic",
        "context_length": 1000000,
        "max_completion_tokens": 32000,
        "pricing": {
          "prompt": "0.0000150",
          "completion": "0.0000750",
          "input_cache_read": "0.0000015",
          "input_cache_write": "0.0000186"
        },
        "supported_parameters": [
          "max_tokens", "temperature", "stop", "tools", "tool_choice",
          "thinking", "include_thinking"
        ],
        "throughput_last_1h": { "p50": 67, "p95": 69.85 },
        "latency_last_1h": { "p50": 2292, "p95": 2685 },
        "uptime_last_1d": 0.998
      },
      {
        "provider_name": "bedrock",
        ...
      }
    ]
  }
}

Latency / throughput

  • latency_last_1h.p50 — median time to first token (ms) over the last hour
  • latency_last_1h.p95 — 95th percentile TTFT (ms)
  • throughput_last_1h.p50 — median tokens-per-second once streaming starts

Use these to pick a provider per-request — e.g. "give me the lowest-latency one":

const eps = await fetch(
  "https://synapse.garden/api/v1/models/anthropic/claude-opus-4.6/endpoints",
  { headers: { Authorization: `Bearer ${MG_KEY}` } },
).then((r) => r.json())

const fastest = eps.data.endpoints
  .sort((a, b) => a.latency_last_1h.p50 - b.latency_last_1h.p50)[0]
  .provider_name

await client.chat.completions.create({
  model: "anthropic/claude-opus-4.6",
  messages: [...],
  providerOptions: { gateway: { order: [fastest] } },
})

Filtering examples

List all language models

const { data: models } = await fetch("https://synapse.garden/api/v1/models", {
  headers: { Authorization: `Bearer ${MG_KEY}` },
}).then((r) => r.json())

const text = models.filter((m) => m.type === "language")

Find vision-capable models under a price ceiling

const cheapVision = models
  .filter((m) => m.type === "language" && m.tags?.includes("vision"))
  .filter((m) => parseFloat(m.pricing.input) * 1_000_000 < 1.0) // < $1/M tokens
  .sort((a, b) => parseFloat(a.pricing.input) - parseFloat(b.pricing.input))

Pick by capability and reasoning

const reasoning = models
  .filter((m) => m.tags?.includes("reasoning") && m.tags?.includes("tool-use"))
  .sort((a, b) => b.context_window - a.context_window)

Caching

The catalog is small (a few hundred models) and changes nightly. The default fetch is fine for most apps; for high-traffic UI, cache for 1 hour:

import { unstable_cache } from "next/cache"

export const getCatalog = unstable_cache(
  async () => {
    const res = await fetch("https://synapse.garden/api/v1/models")
    return await res.json()
  },
  ["mg:catalog"],
  { revalidate: 3600 },
)

Pricing notation

The pricing object contains strings — they're per-single-token decimals to preserve precision. Convert to a per-million-token number:

const perMTokens = parseFloat(model.pricing.input) * 1_000_000
console.log(`$${perMTokens.toFixed(2)}/M`) // "$2.50/M"

See also