Create Dedicated Deployment
curl --request POST \
--url https://api.example.com/api/v2/external/inference/create \
--header 'Content-Type: application/json' \
--data '
{
"hf_model_id": "<string>",
"target_rps": 123,
"target_latency_p95_ms": 123,
"stabilisation_window": 123,
"gpu_type": "<string>",
"hf_token": "<string>",
"min_replicas": 1,
"max_replicas": 1,
"gpu_count": 1,
"gpu_vram_gb": 2,
"vllm_args": "<string>"
}
'import requests
url = "https://api.example.com/api/v2/external/inference/create"
payload = {
"hf_model_id": "<string>",
"target_rps": 123,
"target_latency_p95_ms": 123,
"stabilisation_window": 123,
"gpu_type": "<string>",
"hf_token": "<string>",
"min_replicas": 1,
"max_replicas": 1,
"gpu_count": 1,
"gpu_vram_gb": 2,
"vllm_args": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
hf_model_id: '<string>',
target_rps: 123,
target_latency_p95_ms: 123,
stabilisation_window: 123,
gpu_type: '<string>',
hf_token: '<string>',
min_replicas: 1,
max_replicas: 1,
gpu_count: 1,
gpu_vram_gb: 2,
vllm_args: '<string>'
})
};
fetch('https://api.example.com/api/v2/external/inference/create', 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.example.com/api/v2/external/inference/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hf_model_id' => '<string>',
'target_rps' => 123,
'target_latency_p95_ms' => 123,
'stabilisation_window' => 123,
'gpu_type' => '<string>',
'hf_token' => '<string>',
'min_replicas' => 1,
'max_replicas' => 1,
'gpu_count' => 1,
'gpu_vram_gb' => 2,
'vllm_args' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/external/inference/create"
payload := strings.NewReader("{\n \"hf_model_id\": \"<string>\",\n \"target_rps\": 123,\n \"target_latency_p95_ms\": 123,\n \"stabilisation_window\": 123,\n \"gpu_type\": \"<string>\",\n \"hf_token\": \"<string>\",\n \"min_replicas\": 1,\n \"max_replicas\": 1,\n \"gpu_count\": 1,\n \"gpu_vram_gb\": 2,\n \"vllm_args\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v2/external/inference/create")
.header("Content-Type", "application/json")
.body("{\n \"hf_model_id\": \"<string>\",\n \"target_rps\": 123,\n \"target_latency_p95_ms\": 123,\n \"stabilisation_window\": 123,\n \"gpu_type\": \"<string>\",\n \"hf_token\": \"<string>\",\n \"min_replicas\": 1,\n \"max_replicas\": 1,\n \"gpu_count\": 1,\n \"gpu_vram_gb\": 2,\n \"vllm_args\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/external/inference/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"hf_model_id\": \"<string>\",\n \"target_rps\": 123,\n \"target_latency_p95_ms\": 123,\n \"stabilisation_window\": 123,\n \"gpu_type\": \"<string>\",\n \"hf_token\": \"<string>\",\n \"min_replicas\": 1,\n \"max_replicas\": 1,\n \"gpu_count\": 1,\n \"gpu_vram_gb\": 2,\n \"vllm_args\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Dedicated Inference
Create Dedicated Deployment
POST
/
api
/
v2
/
external
/
inference
/
create
Create Dedicated Deployment
curl --request POST \
--url https://api.example.com/api/v2/external/inference/create \
--header 'Content-Type: application/json' \
--data '
{
"hf_model_id": "<string>",
"target_rps": 123,
"target_latency_p95_ms": 123,
"stabilisation_window": 123,
"gpu_type": "<string>",
"hf_token": "<string>",
"min_replicas": 1,
"max_replicas": 1,
"gpu_count": 1,
"gpu_vram_gb": 2,
"vllm_args": "<string>"
}
'import requests
url = "https://api.example.com/api/v2/external/inference/create"
payload = {
"hf_model_id": "<string>",
"target_rps": 123,
"target_latency_p95_ms": 123,
"stabilisation_window": 123,
"gpu_type": "<string>",
"hf_token": "<string>",
"min_replicas": 1,
"max_replicas": 1,
"gpu_count": 1,
"gpu_vram_gb": 2,
"vllm_args": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
hf_model_id: '<string>',
target_rps: 123,
target_latency_p95_ms: 123,
stabilisation_window: 123,
gpu_type: '<string>',
hf_token: '<string>',
min_replicas: 1,
max_replicas: 1,
gpu_count: 1,
gpu_vram_gb: 2,
vllm_args: '<string>'
})
};
fetch('https://api.example.com/api/v2/external/inference/create', 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.example.com/api/v2/external/inference/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hf_model_id' => '<string>',
'target_rps' => 123,
'target_latency_p95_ms' => 123,
'stabilisation_window' => 123,
'gpu_type' => '<string>',
'hf_token' => '<string>',
'min_replicas' => 1,
'max_replicas' => 1,
'gpu_count' => 1,
'gpu_vram_gb' => 2,
'vllm_args' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/external/inference/create"
payload := strings.NewReader("{\n \"hf_model_id\": \"<string>\",\n \"target_rps\": 123,\n \"target_latency_p95_ms\": 123,\n \"stabilisation_window\": 123,\n \"gpu_type\": \"<string>\",\n \"hf_token\": \"<string>\",\n \"min_replicas\": 1,\n \"max_replicas\": 1,\n \"gpu_count\": 1,\n \"gpu_vram_gb\": 2,\n \"vllm_args\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v2/external/inference/create")
.header("Content-Type", "application/json")
.body("{\n \"hf_model_id\": \"<string>\",\n \"target_rps\": 123,\n \"target_latency_p95_ms\": 123,\n \"stabilisation_window\": 123,\n \"gpu_type\": \"<string>\",\n \"hf_token\": \"<string>\",\n \"min_replicas\": 1,\n \"max_replicas\": 1,\n \"gpu_count\": 1,\n \"gpu_vram_gb\": 2,\n \"vllm_args\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/external/inference/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"hf_model_id\": \"<string>\",\n \"target_rps\": 123,\n \"target_latency_p95_ms\": 123,\n \"stabilisation_window\": 123,\n \"gpu_type\": \"<string>\",\n \"hf_token\": \"<string>\",\n \"min_replicas\": 1,\n \"max_replicas\": 1,\n \"gpu_count\": 1,\n \"gpu_vram_gb\": 2,\n \"vllm_args\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Request body for POST /api/v2/external/inference/create.
HuggingFace model ID, e.g. 'meta-llama/Llama-3.2-1B'
Target requests per second per replica for scale-up
Target p95 latency in milliseconds for scale-up
Stabilisation window in seconds for scale-down
GPU type, e.g. 'h100', 'a100'
HuggingFace token for gated models
Minimum replicas to keep running
Required range:
x >= 1Maximum replicas allowed
Required range:
x >= 1Number of GPUs per replica
Required range:
x >= 1GPU VRAM in GB per GPU
Required range:
x >= 1Extra vLLM engine args, comma-separated without leading --
⌘I

