Retrieve a custom model
Retrieve a model by name. Global models are accessible by anyone. Custom models are only accessible by the owning organization.
Path parameters
model_name
The model’s unique name. Can include slashes (e.g., openai/gpt-4).
Headers
Authorization
Bearer token. Use Bearer YOUR_API_KEY.
Response
Model details.
id
Model ID.
model_name
Unique model name.
display_name
Display name.
base_model_name
Base model inherited from.
affiliation_category
Model type.
Allowed values:
input_cost
Cost per 1M input tokens (USD).
output_cost
Cost per 1M output tokens (USD).
cache_hit_input_cost
Cost per 1M cached input tokens (USD).
cache_creation_input_cost
Cost per 1M cache creation tokens (USD).
max_context_window
Maximum context window size.
streaming_support
Streaming support. 0 = no, 1 = yes.
function_call
Function calling support. 0 = no, 1 = yes.
image_support
Image/vision support. 0 = no, 1 = yes.
source
Model source.
Allowed values:
provider
Associated provider.
Errors
401
Unauthorized Error
404
Not Found Error