List
List Available Models
get/v2/gen-ai/models
To list all models, send a GET request to /v2/gen-ai/models
.
Query Parameters
pagenumber
optional
Page number.
per_pagenumber
optional
Items per page.
public_onlyboolean
optional
Only include models that are publicly available.
usecasesarray of enum
optional
Include only models defined for the listed usecases.
- MODEL_USECASE_UNKNOWN: The use case of the model is unknown
- MODEL_USECASE_AGENT: The model maybe used in an agent
- MODEL_USECASE_FINETUNED: The model maybe used for fine tuning
- MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models)
- MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails
- MODEL_USECASE_REASONING: The model usecase for reasoning
- MODEL_USECASE_SERVERLESS: The model usecase for serverless inference
Returns
Links to other pages
Meta information about the data set
modelsarray of agreementAPIAgreementcreated_atstringis_foundationalbooleannamestringparent_uuidstringupdated_atstringupload_completebooleanurlstringuuidstringversionAPIModelVersionAPIModel
optional
The models
curl https://api.digitalocean.com//v2/gen-ai/models \
-H "Authorization: Bearer $GRADIENTAI_API_KEY"
200 Example
{
"links": {
"pages": {
"first": "\"example string\"",
"last": "\"example string\"",
"next": "\"example string\"",
"previous": "\"example string\""
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"models": [
{
"agreement": {
"description": "\"example string\"",
"name": "\"example name\"",
"url": "\"example string\"",
"uuid": "\"123e4567-e89b-12d3-a456-426614174000\""
},
"created_at": "2021-01-01T00:00:00Z",
"is_foundational": true,
"name": "Llama 3.3 (70b)",
"parent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"updated_at": "2021-01-01T00:00:00Z",
"upload_complete": true,
"url": "https://example.com/model.zip",
"uuid": "\"12345678-1234-1234-1234-123456789012\"",
"version": {
"major": 123,
"minor": 123,
"patch": 123
}
}
]
}