Get a loaded adapter
curl --request GET \
--url https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}import requests
url = "https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}', 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}/deployedModels/{deployed_model_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/deployedModels/{deployed_model_id}"
req, _ := http.NewRequest("GET", url, nil)
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}/deployedModels/{deployed_model_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodySpecialized Model Inference
Get a loaded adapter
Check one loaded adapter’s state, for example to see whether it’s ready for traffic.
GET
/
v1
/
accounts
/
{account_id}
/
deployedModels
/
{deployed_model_id}
Get a loaded adapter
curl --request GET \
--url https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}import requests
url = "https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}', 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}/deployedModels/{deployed_model_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/deployedModels/{deployed_model_id}"
req, _ := http.NewRequest("GET", url, nil)
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}/deployedModels/{deployed_model_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fireworks.ai/v1/accounts/{account_id}/deployedModels/{deployed_model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPreview
This takes the deployed model ID, not the adapter ID. Get it from the load response, or see Find the deployed model ID.
curl "https://api.fireworks.ai/v1/accounts/$ACCOUNT_ID/deployedModels/$DEPLOYED_MODEL_ID" \
-H "Authorization: Bearer $FIREWORKS_API_KEY"
Path parameters
string
required
Your account ID.
string
required
The last segment of the deployed model’s
name.Response
Returns the deployed model.Wait until the adapter is ready
If you loaded without--wait, poll until state is DEPLOYED:
until [ "$(curl -s "https://api.fireworks.ai/v1/accounts/$ACCOUNT_ID/deployedModels/$DEPLOYED_MODEL_ID" \
-H "Authorization: Bearer $FIREWORKS_API_KEY" | jq -r .state)" = "DEPLOYED" ]; do
echo "waiting..."; sleep 15
done
echo "ready"
Was this page helpful?
⌘I