Models & discovery
List models, capabilities, supported parameters, and pricing.
GET /v1/models returns the OneHop model catalog in an OpenAI-compatible list
shape. Every item keeps the OpenAI core fields id, object, and owned_by,
so strict clients can read data[].id without understanding the richer fields.
You authenticate with an API key, but this endpoint does not create usage records, charge credits, or forward requests to model providers.
curl https://api.onehop.ai/v1/models \
-H "Authorization: Bearer $ONEHOP_API_KEY"Model slugs
Every model has a canonical slug of the form provider/model, for example
openai/gpt-5.5 or anthropic/claude-opus-4.8. Always pass the slug exactly as
returned by /v1/models — that is the id your chat/completions,
messages, and images requests should use.
Don't hard-code a flagship
Model availability changes over time. Read /v1/models at startup (or cache it
briefly) rather than pinning a specific top-tier model id in source.
Using the OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ONEHOP_API_KEY,
baseURL: "https://api.onehop.ai/v1",
});
const models = await client.models.list();
console.log(models.data.map((model) => model.id));For the strict OpenAI-compatible shape:
curl "https://api.onehop.ai/v1/models?compat=openai" \
-H "Authorization: Bearer $ONEHOP_API_KEY"Filter and sort
Common filters:
q: search by id, provider, summary, or aliasid: exact model id, alias, or provider model idproviderorowned_by: provider slugprotocol:openai_chat,openai_responses,anthropic_messages,openai_images,openai_sora, orgoogle_vertex_aicapability: for examplereasoning,tool_calling,vision, orimage_generationinput_modality/output_modality: for exampletext,image,audio, orvideosupported_parameter: for exampletools,temperature,reasoning, ormax_tokens
Pagination and sorting:
limit: default100, max500cursor: cursor returned asnext_cursorsort:display_order,id,created_desc,context_desc,price_prompt_asc, orprice_completion_asc
Pricing fields
Pricing is exposed for ecosystem compatibility. OneHop's authoritative billing
truth lives under onehop.pricing.our; onehop.pricing.official is a reference
price only. Use the compat views to match the ecosystem your tooling expects:
compat=openrouteraddspricing,architecture,top_provider, andsupported_parameters.compat=zenmuxadds groupedpricingssuch asprompt,completion,input_cache_read,image,video, oraudio.include=pricing,capabilities,protocols,aliasesadds individual sections to the defaultonehopview.
curl "https://api.onehop.ai/v1/models?compat=openrouter&supported_parameter=tools" \
-H "Authorization: Bearer $ONEHOP_API_KEY"Anthropic-compatible list
Anthropic-compatible model discovery is available at /anthropic/v1/models. It
lists only models that support the Anthropic Messages protocol.
curl https://api.onehop.ai/anthropic/v1/models \
-H "x-api-key: $ONEHOP_API_KEY"