Get Model
curl --request GET \
--url https://api.example.com/api/models/model{
"id": "<string>",
"user_id": "<string>",
"base_model_id": "<string>",
"name": "<string>",
"params": {},
"meta": {
"profile_image_url": "<string>",
"description": "<string>",
"capabilities": {}
},
"access_grants": [
{}
],
"is_active": true,
"write_access": true,
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"created_at": 123,
"updated_at": 123
}Models
Get Model
Retrieve a specific model by its ID
GET
/
api
/
models
/
model
Get Model
curl --request GET \
--url https://api.example.com/api/models/model{
"id": "<string>",
"user_id": "<string>",
"base_model_id": "<string>",
"name": "<string>",
"params": {},
"meta": {
"profile_image_url": "<string>",
"description": "<string>",
"capabilities": {}
},
"access_grants": [
{}
],
"is_active": true,
"write_access": true,
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"created_at": 123,
"updated_at": 123
}Query Parameters
The unique identifier of the model to retrieve. Can contain ’/’ characters.
Response
The model’s unique identifier used in API calls
ID of the user who created the model
Optional pointer to the actual model used when proxying requests
Human-readable display name of the model
JSON object containing model parameters (flexible schema)
Array of access grant objects defining who can access this model and with what permissions
Whether the model is currently active and available for use
Whether the current user has write access to modify this model
Unix timestamp (in seconds) of when the model was created
Unix timestamp (in seconds) of when the model was last updated
Example Request
curl -X GET "https://api.example.com/api/models/model?id=gpt-4-custom" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"id": "gpt-4-custom",
"user_id": "user123",
"base_model_id": "gpt-4",
"name": "Custom GPT-4",
"params": {
"temperature": 0.7,
"max_tokens": 2000,
"top_p": 1.0
},
"meta": {
"profile_image_url": "/static/favicon.png",
"description": "A customized GPT-4 model optimized for code generation",
"capabilities": {
"vision": true,
"function_calling": true
}
},
"access_grants": [
{
"access_type": "user",
"access_id": "user456",
"permission": "read"
}
],
"is_active": true,
"write_access": true,
"user": {
"id": "user123",
"name": "John Doe",
"email": "john@example.com"
},
"created_at": 1704067200,
"updated_at": 1704153600
}
Error Responses
404
Model not found
{
"detail": "Model not found"
}
401
Unauthorized - User does not have access to this model
{
"detail": "Access prohibited"
}
⌘I