/v1/models

Enumerating models


Models

The models endpoint gives the listing of all models in the catalogue, as well as current state. This endpoint can be called from either an authenticated or unauthenticated context.

HTTP request

GET https://api.featherless.ai/v1/models

Query Parameters

Parameter

Type

Description

available_on_current_plan

integer

Set this parameter to limit the results to match the currently authenticated user’s plan.

set to 0 to get all models that the current user’s can use and set to 1 to get all models that the current user cannot use.

Response body

If successful, the response body will contain data with the following structure:

{
  "data": [
    {
      "id": "vicgalle/Roleplay-Llama-3-8B",
      "name": "vicgalle/Roleplay-Llama-3-8B",
      "model_class": "llama3-8b-8k",
      "context_length": 8192,
      "max_completion_tokens": 4096
    },
	// and more models ..
  ]
}

Model Attributes

Parameter

Type

Description

id

string

use this value when calling a completion endpoint

model_class

string

context_length

integer

Maximum context length (i.e. prompt + completion) supported by the model.

Clients that call a completion endpoint wit this model and a prompt of this length or longer should expect an error

max_completion_tokens

integer

Maximum amount of output that will be generated in a single call.

Calls to completion endpoints with max_tokens value greater than this should expect the value to be clamped to this value.

is_gated

boolean

Will return true if the model is gated on Hugging Face.

Users must have ungated the model in their connected HuggingFace account before a completion call will be accepted for this model on featherless. Otherwise the completion call will return 403 and an application should instruct the user to visit the model in featherless for instructions to clear the gate.

Note this a property of the model. It does not report the currently authenticated user’s relationship to that model.

available_on_current_plan

boolean

returned if and only if the request was authenticated.

If the value is false, expect a 403 if the user attempts to use this model with a completions endpoint.

Example request

curl "https://api.featherless.ai/v1/models?available_on_current_plan=true" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $FEATHERLESS_API_KEY"