Get all available models.
import Itzam from "itzam";
const itzam = new Itzam("YOUR_API_KEY");
const response = await itzam.getModels();
The getModels
method returns the following object:
type GetModelsResponse = {
models: {
name: string; // The name of the model
tag: string; // The tag of the model
deprecated: boolean; // Whether the model is deprecated
hasVision: boolean; // Whether the model has vision capability
hasReasoningCapability: boolean; // Whether the model has reasoning capability
isOpenSource: boolean; // Whether the model is open source
contextWindowSize: number; // The context window size of the model
inputPerMillionTokenCost: string | null; // The input cost per million tokens of the model
outputPerMillionTokenCost: string | null; // The output cost per million tokens of the model
provider: {
name: string; // The name of the provider
};
}[];
};