Models
The catalog of models your project can call through Lykia, with context length, supported parameters and per-token prices.
MarkdownOn this page
/v1/modelsReturns every model the calling key's project can use through Lykia. A model is listed when a provider Lykia connects to directly offers it with a price; models at the providers of the project's own provider keys are listed too, so two projects can see different lists. The response may be up to a minute old. If you send a model that has since dropped out of it, or that has been turned off, the request fails with 404. How to read model ids and prices is explained in the Models guide.
Query parameters
supported_parametersstringReturn only models that support this parameter, for example tools for models that can call tools or response_format for JSON output. Separate several names with commas to get models that support all of them.
output_modalitiesstringThe default list is meant for chat and leaves out models that only produce vectors (embeddings). embedding returns only the models for POST /embeddings; image, video, audio (speech) and transcription return media models with that output; all returns everything.
kindstringOnly models of these kinds, separated by commas: chat, embedding, image, video, speech or transcription. Media models (image, video, speech, transcription) are not in the default list; ask for them with kind or output_modalities.
Example
List the models that support tool calling:
curl "https://api.getlykia.com/v1/models?supported_parameters=tools" \
-H "Authorization: Bearer $LYKIA_API_KEY"import os
import requests
response = requests.get(
"https://api.getlykia.com/v1/models?supported_parameters=tools",
headers={"Authorization": f"Bearer {os.environ['LYKIA_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
models = response.json()["data"]
for model in models:
print(model["id"], model["context_length"], model["pricing"].get("prompt"))const response = await fetch("https://api.getlykia.com/v1/models?supported_parameters=tools", {
headers: { Authorization: `Bearer ${process.env.LYKIA_API_KEY}` },
});
if (!response.ok) {
throw new Error(`Lykia returned ${response.status}: ${await response.text()}`);
}
const { data: models } = await response.json();
for (const model of models) {
console.log(model.id, model.context_length, model.pricing.prompt);
}package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest(http.MethodGet, "https://api.getlykia.com/v1/models?supported_parameters=tools", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("LYKIA_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
if resp.StatusCode != http.StatusOK {
panic(fmt.Sprintf("Lykia returned %d: %s", resp.StatusCode, body))
}
var result struct {
Data []struct {
ID string `json:"id"`
ContextLength int `json:"context_length"`
Pricing struct {
Prompt string `json:"prompt"`
Completion string `json:"completion"`
} `json:"pricing"`
} `json:"data"`
}
if err := json.Unmarshal(body, &result); err != nil {
panic(err)
}
for _, model := range result.Data {
fmt.Println(model.ID, model.ContextLength, model.Pricing.Prompt)
}
}{
"data": [
{
"id": "openai/gpt-4o-mini",
"canonical_slug": "openai/gpt-4o-mini",
"hugging_face_id": null,
"name": "OpenAI: GPT-4o-mini",
"created": 1795415185,
"description": "GPT-4o mini is OpenAI's small, low-cost multimodal model. It accepts text, image and file inputs and returns text.",
"context_length": 128000,
"architecture": {
"modality": "text+image+file->text",
"input_modalities": [
"text",
"image",
"file"
],
"output_modalities": [
"text"
],
"tokenizer": null
},
"pricing": {
"prompt": "0.00000015",
"completion": "0.0000006",
"input_cache_read": "0.000000075"
},
"top_provider": {
"context_length": 128000,
"max_completion_tokens": 16384
},
"supported_parameters": [
"frequency_penalty",
"logit_bias",
"logprobs",
"max_completion_tokens",
"max_tokens",
"prediction",
"presence_penalty",
"response_format",
"seed",
"stop",
"structured_outputs",
"temperature",
"tool_choice",
"tools",
"top_logprobs",
"top_p",
"web_search_options"
],
"is_free": false,
"expiration_date": null,
"kind": "chat"
}
]
}Response
The response is a data array of model objects, newest first. The field names are the ones common OpenAI-compatible model lists use, so libraries that read that format read this list without changes.
idstringThe model id, author/model. This is the value you put in a request's model field.
canonical_slugstringThe model's id; in Lykia it is the same as id.
hugging_face_idnullPresent for compatibility; Lykia does not fill it in.
namestringDisplay name.
createdinteger | nullWhen the model was released, or when it was added to the catalog if the release date is not known, as a Unix timestamp in seconds.
descriptionstringA short description of the model.
context_lengthinteger | nullThe most tokens the input and output can add up to.
architectureobjectWhat the model takes in and puts out.
modalitystringA compact summary such as text+image->text.
input_modalitiesstring[]Accepted input types (text, image, file…).
output_modalitiesstring[]Output types it produces.
tokenizernullPresent for compatibility; Lykia does not fill it in.
pricingobjectUnit prices in USD, as decimal strings. Only the units that have a price for the model are present. When the model is offered by more than one provider, this is the lowest price available to your project.
promptstringPer input token.
completionstringPer generated token.
requeststringA flat fee per request.
imagestringPer input image.
input_cache_readstringPer input token read from the cache.
input_cache_writestringPer input token written to the cache.
top_providerobjectThe model's limits.
context_lengthinteger | nullContext length.
max_completion_tokensinteger | nullThe most tokens a single response can contain.
supported_parametersstring[]The request parameters the model supports (tools, response_format, temperature…).
is_freebooleantrue for a free model: requests to it are not charged to credits but count towards the daily limit for free models.
expiration_datestring | nullThe date the model will be retired, or null if none is set.
kindstringWhich endpoint the model is for: chat, embedding, image, video, speech or transcription.
mediaobjectOnly on media models. Their token pricing is {}; the price is here instead.
kindstringimage, video, speech or transcription.
capabilitiesobjectWhat the model accepts: for example sizes, sizeRule, aspectRatios, resolutions, qualities, maxN, maxInputImages, mask, seed, outputFormats, durations, firstFrame, lastFrame, audio, speech (formats, speed, input limit), transcription (formats, file limit, timestamps) and providerOptions (the allowed provider_options). deprecatedAt is the date the provider retires the model, when announced.
pricingobjectThe unit price: unit (per_image, per_megapixel, per_second, per_minute, per_video, per_character or per_token), quantity (how many units usd is for; 1 unless stated), tiers (prices by variant: each has when, the conditions such as resolution, quality, audio or tokenType, and usd, a decimal string), surcharges (extra fees with when, usd and per: request, image or second) and an optional note.
providersstring[]The providers that serve the model for your project, in the order Lykia tries them.
These are list prices. A request's cost is calculated from prompt, completion, input_cache_read, input_cache_write, image and request; details in Credits and billing.