Skip to main content

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

ParameterTypeRequiredDescription
modelstringYesThe 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 CodeError CodeDescription
400invalid_requestThe request was invalid
401authentication_errorAuthentication failed
404model_not_foundThe model was not found
429rate_limit_exceededRate limit exceeded
500server_errorInternal server error

Rate Limits

  • 100 requests per minute
  • 1000 requests per hour