Model Types TypeScript types for browsing models, pricing, vendor info, and model metadata.
API Documentation Reference: Model types conform to the GET /v1/models response schema. The SDK provides TypeScript types that match the API 1:1 with no modifications. Browse available models in the Model Catalog .
See Models for usage.
SDK representation of the Model object returned from the Models API. This TypeScript interface matches the API JSON response exactly — returned by GET /v1/models and GET /v1/models/:slug . The SDK performs no transformations.
interface Model {
name : string ;
description : string ;
namespace : string ;
type : ModelType ;
privacy : ModelPrivacy ;
img_url : string | null ;
vendor : Vendor ;
billable : boolean ;
pricing : Pricing ;
capabilities : string [];
metadata : ModelMetadata ;
status : string ;
service : Service ;
input_schema : ModelInputSchema | null ;
output_schema : ModelOutputSchema | null ;
}
Field Type Description namestringDisplay name. descriptionstringModel description. namespacestringAPI slug — pass to client.run() . typeModelTypeContent type. privacyModelPrivacy'public' or 'private'.img_urlstring | nullModel image URL. vendorVendorProvider info. billablebooleanWhether predictions are billed. pricingPricingCost info. See Pricing . capabilitiesstring[]e.g. ['text-to-image', 'image-to-image']. metadataModelMetadataRuntime hints. statusstring'operational' or 'offline'.serviceServiceInference service info. input_schemaModelInputSchema | nullJSON Schema for inputs (when requested via fields). output_schemaModelOutputSchema | nullJSON Schema for outputs (when requested via fields).
interface Vendor {
name : string ;
description : string ;
image_url : string ;
verified : boolean ;
slug : string ;
metadata : unknown ;
}
Field Type Description namestringVendor name. descriptionstringVendor description. image_urlstringVendor logo URL. verifiedbooleanWhether the vendor is verified. slugstringVendor slug. metadataunknownVendor metadata.
interface Pricing {
amount : number ;
currency : string ;
unit : string ;
criterias : PricingCriteria [];
formula : PricingFormula ;
}
Field Type Description amountnumberPrice per unit. currencystringCurrency code (e.g. 'USD'). unitstringBilling unit — see PricingUnit. criteriasPricingCriteria[]Conditional pricing rules. formulaPricingFormulaComputed pricing formula.
interface PricingCriteria {
field : string ;
description : string ;
operator : PricingOperator ;
value : string | boolean | number ;
billable_price : number ;
unit : string ;
}
Field Type Description fieldstringInput field to evaluate. descriptionstringHuman-readable description. operatorPricingOperator'equals' or '=='.valuestring | boolean | numberValue to compare. billable_pricenumberPrice when criteria matches. unitstringBilling unit for this criteria.
interface PricingFormula {
description : string ;
type : string ;
variables : Record < string , number >;
terms : PricingFormulaTerm [];
result_key : string ;
}
Field Type Description descriptionstringFormula description. typestringFormula type. variablesRecord<string, number>Variable values. termsPricingFormulaTerm[]Formula terms. result_keystringResult variable name.
interface ModelMetadata {
edge_compatible : boolean ;
openai_compatible : boolean ;
cold_boot : boolean ;
deployment_hardware : DeploymentHardware ;
}
Field Type Description edge_compatiblebooleanWorks in edge runtimes. openai_compatiblebooleanHas OpenAI-compatible interface. cold_bootbooleanRequires cold boot. deployment_hardwareDeploymentHardwareHardware info.
interface DeploymentHardware {
type : string ;
slug : string ;
}
Field Type Description typestringHardware type. slugstringHardware slug.
interface ModelInputSchema {
type : string ;
title : string ;
required : string [];
properties : Record < string , Record < string , any >>;
}
type ModelOutputSchema = ModelInputSchema ;
Field Type Description typestringJSON Schema type. titlestringSchema title. requiredstring[]Required fields. propertiesRecord<string, ...>Property definitions.
interface ModelFieldsOptions {
fields : ( 'input_schema' | 'output_schema' )[];
}
Field Type Description fields('input_schema' | 'output_schema')[]Extra fields to include.
interface Service {
type : string ;
inference_party : string ;
}
Field Type Description typestringService type. inference_partystringWhich party runs inference.
enum ModelType {
IMAGE = 'image' ,
VIDEO = 'video' ,
AUDIO = 'audio' ,
MUSIC = 'music' ,
TEXT = 'text' ,
CODE = 'code' ,
MULTIMODAL = 'multimodal' ,
}
enum ModelPrivacy {
PUBLIC = 'public' ,
PRIVATE = 'private' ,
}
enum PricingUnit {
IMAGE = 'image' ,
VIDEO = 'video' ,
SECOND = 'second' ,
PREDICTION = 'prediction' ,
GPU = 'gpu' ,
IMAGE_MEGAPIXEL = 'image_megapixel' ,
COMPUTING_SECOND = 'computing_second' ,
AUDIO_SECOND = 'audio_second' ,
VIDEO_SECOND = 'video_second' ,
TOKEN = 'token' ,
FIVE_SECONDS = '5 seconds' ,
MINUTE = 'minute' ,
}
enum PricingOperator {
EQUALS = 'equals' ,
DOUBLE_EQUALS = '==' ,
} How is this guide?
Good Bad