Models
List Models
GET
/
v1
/
accounts
/
{account_id}
/
models
List Models
curl --request GET \
--url https://api.fireworks.ai/v1/accounts/{account_id}/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fireworks.ai/v1/accounts/{account_id}/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fireworks.ai/v1/accounts/{account_id}/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireworks.ai/v1/accounts/{account_id}/models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fireworks.ai/v1/accounts/{account_id}/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fireworks.ai/v1/accounts/{account_id}/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireworks.ai/v1/accounts/{account_id}/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"models": [
{
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"state": "STATE_UNSPECIFIED",
"status": {
"code": "OK",
"message": "<string>"
},
"kind": "KIND_UNSPECIFIED",
"githubUrl": "<string>",
"huggingFaceUrl": "<string>",
"baseModelDetails": {
"worldSize": 123,
"checkpointFormat": "CHECKPOINT_FORMAT_UNSPECIFIED",
"huggingfaceFiles": [
"<string>"
],
"parameterCount": "<string>",
"moe": true,
"tunable": true,
"modelType": "<string>",
"supportsFireattention": true,
"defaultPrecision": "PRECISION_UNSPECIFIED",
"supportsMtp": true
},
"peftDetails": {
"baseModel": "<string>",
"r": 123,
"targetModules": [
"<string>"
],
"baseModelType": "<string>",
"mergeAddonModelName": "<string>"
},
"teftDetails": {},
"public": true,
"conversationConfig": {
"style": "<string>",
"system": "<string>",
"template": "<string>"
},
"contextLength": 123,
"supportsImageInput": true,
"supportsTools": true,
"importedFrom": "<string>",
"fineTuningJob": "<string>",
"defaultDraftModel": "<string>",
"defaultDraftTokenCount": 123,
"deployedModelRefs": [
{
"name": "<string>",
"deployment": "<string>",
"state": "STATE_UNSPECIFIED",
"default": true,
"public": true
}
],
"cluster": "<string>",
"deprecationDate": {
"year": 123,
"month": 123,
"day": 123
},
"calibrated": true,
"tunable": true,
"supportsLora": true,
"useHfApplyChatTemplate": true,
"updateTime": "2023-11-07T05:31:56Z",
"defaultSamplingParams": {},
"rlTunable": true,
"trainingContextLength": 123,
"snapshotType": "FULL_SNAPSHOT",
"supportsServerless": true,
"useTrainingV2": true,
"supervisedLoraTunable": true,
"supervisedFullParameterTunable": true,
"rlLoraTunable": true,
"rlFullParameterTunable": true,
"encryptionState": "ENCRYPTION_STATE_UNSPECIFIED",
"serverlessModes": [
{
"name": "<string>",
"usageIdentifier": "<string>",
"serviceTier": "<string>",
"skuInfos": [
{
"sku": "<string>",
"amount": {
"currencyCode": "<string>",
"units": "<string>",
"nanos": 123
},
"unit": "<string>"
}
],
"useCases": [
"<string>"
],
"updatedBy": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z"
}
]
}
],
"nextPageToken": "<string>",
"totalSize": 123
}Authorizations
Query Parameters
Only model satisfying the provided filter (if specified) will be returned. See https://google.aip.dev/160 for the filter grammar.
A comma-separated list of fields to order by. e.g. "foo,bar" The default sort order is ascending. To specify a descending order for a field, append a " desc" suffix. e.g. "foo desc,bar" Subfields are specified with a "." character. e.g. "foo.bar" If not specified, the default order is by "name".
Was this page helpful?
⌘I
List Models
curl --request GET \
--url https://api.fireworks.ai/v1/accounts/{account_id}/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fireworks.ai/v1/accounts/{account_id}/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fireworks.ai/v1/accounts/{account_id}/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireworks.ai/v1/accounts/{account_id}/models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fireworks.ai/v1/accounts/{account_id}/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fireworks.ai/v1/accounts/{account_id}/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireworks.ai/v1/accounts/{account_id}/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"models": [
{
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"state": "STATE_UNSPECIFIED",
"status": {
"code": "OK",
"message": "<string>"
},
"kind": "KIND_UNSPECIFIED",
"githubUrl": "<string>",
"huggingFaceUrl": "<string>",
"baseModelDetails": {
"worldSize": 123,
"checkpointFormat": "CHECKPOINT_FORMAT_UNSPECIFIED",
"huggingfaceFiles": [
"<string>"
],
"parameterCount": "<string>",
"moe": true,
"tunable": true,
"modelType": "<string>",
"supportsFireattention": true,
"defaultPrecision": "PRECISION_UNSPECIFIED",
"supportsMtp": true
},
"peftDetails": {
"baseModel": "<string>",
"r": 123,
"targetModules": [
"<string>"
],
"baseModelType": "<string>",
"mergeAddonModelName": "<string>"
},
"teftDetails": {},
"public": true,
"conversationConfig": {
"style": "<string>",
"system": "<string>",
"template": "<string>"
},
"contextLength": 123,
"supportsImageInput": true,
"supportsTools": true,
"importedFrom": "<string>",
"fineTuningJob": "<string>",
"defaultDraftModel": "<string>",
"defaultDraftTokenCount": 123,
"deployedModelRefs": [
{
"name": "<string>",
"deployment": "<string>",
"state": "STATE_UNSPECIFIED",
"default": true,
"public": true
}
],
"cluster": "<string>",
"deprecationDate": {
"year": 123,
"month": 123,
"day": 123
},
"calibrated": true,
"tunable": true,
"supportsLora": true,
"useHfApplyChatTemplate": true,
"updateTime": "2023-11-07T05:31:56Z",
"defaultSamplingParams": {},
"rlTunable": true,
"trainingContextLength": 123,
"snapshotType": "FULL_SNAPSHOT",
"supportsServerless": true,
"useTrainingV2": true,
"supervisedLoraTunable": true,
"supervisedFullParameterTunable": true,
"rlLoraTunable": true,
"rlFullParameterTunable": true,
"encryptionState": "ENCRYPTION_STATE_UNSPECIFIED",
"serverlessModes": [
{
"name": "<string>",
"usageIdentifier": "<string>",
"serviceTier": "<string>",
"skuInfos": [
{
"sku": "<string>",
"amount": {
"currencyCode": "<string>",
"units": "<string>",
"nanos": 123
},
"unit": "<string>"
}
],
"useCases": [
"<string>"
],
"updatedBy": "<string>",
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z"
}
]
}
],
"nextPageToken": "<string>",
"totalSize": 123
}