Models API
The Models API allows you to list and retrieve information about available Fluence models.
List Models
Endpoint
GET /v1/models
Response Format
{
"data": [
{
"id": "string",
"object": "model",
"created": number,
"owned_by": "string",
"permission": [
{
"id": "string",
"object": "model_permission",
"created": number,
"allow_create_engine": boolean,
"allow_sampling": boolean,
"allow_logprobs": boolean,
"allow_search_indices": boolean,
"allow_view": boolean,
"allow_fine_tuning": boolean,
"organization": "string",
"group": "string",
"is_blocking": boolean
}
],
"root": "string",
"parent": "string"
}
]
}
Example Request
curl https://api.fluence.ai/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"data": [
{
"id": "fluence-chat",
"object": "model",
"created": 1677610602,
"owned_by": "fluence",
"permission": [
{
"id": "modelperm-123",
"object": "model_permission",
"created": 1677610602,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "fluence-chat",
"parent": null
}
]
}
Retrieve Model
Endpoint
GET /v1/models/{model}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | The ID of the model to retrieve |
Response Format
{
"id": "string",
"object": "model",
"created": number,
"owned_by": "string",
"permission": [
{
"id": "string",
"object": "model_permission",
"created": number,
"allow_create_engine": boolean,
"allow_sampling": boolean,
"allow_logprobs": boolean,
"allow_search_indices": boolean,
"allow_view": boolean,
"allow_fine_tuning": boolean,
"organization": "string",
"group": "string",
"is_blocking": boolean
}
],
"root": "string",
"parent": "string"
}
Example Request
curl https://api.fluence.ai/v1/models/fluence-chat \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"id": "fluence-chat",
"object": "model",
"created": 1677610602,
"owned_by": "fluence",
"permission": [
{
"id": "modelperm-123",
"object": "model_permission",
"created": 1677610602,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "fluence-chat",
"parent": null
}
Error Codes
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | The request was invalid |
| 401 | authentication_error | Authentication failed |
| 404 | model_not_found | The model was not found |
| 429 | rate_limit_exceeded | Rate limit exceeded |
| 500 | server_error | Internal server error |
Rate Limits
- 100 requests per minute
- 1000 requests per hour