curl --request POST \
--url https://api.deepinfra.com/deploy/llm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_name": "<string>",
"num_gpus": 1,
"hf": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
},
"base_model": "<string>",
"container_image": "<string>",
"settings": {
"min_instances": 1,
"max_instances": 1
},
"extra_args": [
"<string>"
],
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"enable_prefix_caching": true
},
"preset_id": "<string>"
}
'import requests
url = "https://api.deepinfra.com/deploy/llm"
payload = {
"model_name": "<string>",
"num_gpus": 1,
"hf": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
},
"base_model": "<string>",
"container_image": "<string>",
"settings": {
"min_instances": 1,
"max_instances": 1
},
"extra_args": ["<string>"],
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"enable_prefix_caching": True
},
"preset_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
num_gpus: 1,
hf: {repo: '<string>', revision: '<string>', token: '<string>'},
base_model: '<string>',
container_image: '<string>',
settings: {min_instances: 1, max_instances: 1},
extra_args: ['<string>'],
standard_args: {
max_context_size: 5000000,
max_concurrent_requests: 512,
gpu_memory_fraction: 0.735,
max_prefill_tokens: 65792,
enable_prefix_caching: true
},
preset_id: '<string>'
})
};
fetch('https://api.deepinfra.com/deploy/llm', 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.deepinfra.com/deploy/llm",
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([
'model_name' => '<string>',
'num_gpus' => 1,
'hf' => [
'repo' => '<string>',
'revision' => '<string>',
'token' => '<string>'
],
'base_model' => '<string>',
'container_image' => '<string>',
'settings' => [
'min_instances' => 1,
'max_instances' => 1
],
'extra_args' => [
'<string>'
],
'standard_args' => [
'max_context_size' => 5000000,
'max_concurrent_requests' => 512,
'gpu_memory_fraction' => 0.735,
'max_prefill_tokens' => 65792,
'enable_prefix_caching' => true
],
'preset_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.deepinfra.com/deploy/llm"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"num_gpus\": 1,\n \"hf\": {\n \"repo\": \"<string>\",\n \"revision\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"base_model\": \"<string>\",\n \"container_image\": \"<string>\",\n \"settings\": {\n \"min_instances\": 1,\n \"max_instances\": 1\n },\n \"extra_args\": [\n \"<string>\"\n ],\n \"standard_args\": {\n \"max_context_size\": 5000000,\n \"max_concurrent_requests\": 512,\n \"gpu_memory_fraction\": 0.735,\n \"max_prefill_tokens\": 65792,\n \"enable_prefix_caching\": true\n },\n \"preset_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.deepinfra.com/deploy/llm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"num_gpus\": 1,\n \"hf\": {\n \"repo\": \"<string>\",\n \"revision\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"base_model\": \"<string>\",\n \"container_image\": \"<string>\",\n \"settings\": {\n \"min_instances\": 1,\n \"max_instances\": 1\n },\n \"extra_args\": [\n \"<string>\"\n ],\n \"standard_args\": {\n \"max_context_size\": 5000000,\n \"max_concurrent_requests\": 512,\n \"gpu_memory_fraction\": 0.735,\n \"max_prefill_tokens\": 65792,\n \"enable_prefix_caching\": true\n },\n \"preset_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/deploy/llm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"num_gpus\": 1,\n \"hf\": {\n \"repo\": \"<string>\",\n \"revision\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"base_model\": \"<string>\",\n \"container_image\": \"<string>\",\n \"settings\": {\n \"min_instances\": 1,\n \"max_instances\": 1\n },\n \"extra_args\": [\n \"<string>\"\n ],\n \"standard_args\": {\n \"max_context_size\": 5000000,\n \"max_concurrent_requests\": 512,\n \"gpu_memory_fraction\": 0.735,\n \"max_prefill_tokens\": 65792,\n \"enable_prefix_caching\": true\n },\n \"preset_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deploy_id": "fkj843kjh8",
"model_name": "google/vit-base-patch16-224",
"version": "d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b",
"task": "image-classification",
"status": "deployed",
"fail_reason": "Initialization failed",
"created_at": "2021-08-27T17:19:21+00:00",
"updated_at": "2021-08-27T17:19:21+00:00",
"type": "legacy",
"instances": {
"running": 123,
"pending": 123
},
"config": {
"gpu": "L4-24GB",
"num_gpus": 123,
"max_batch_size": 123,
"weights": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
}
},
"settings": {
"min_instances": 1,
"max_instances": 1
},
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"kv_cache_dtype": "auto",
"enable_prefix_caching": true,
"quantization": "fp8"
},
"extra_args": [
"<string>"
],
"update_error": "<string>",
"rollout": {
"up_to_date": 123,
"outdated": 123,
"booting": 123
}
}{
"error": "Model not found"
}{
"error": "Model not found"
}{
"error": "Model not found"
}{
"error": "Model not found"
}Deploy Create Llm
curl --request POST \
--url https://api.deepinfra.com/deploy/llm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model_name": "<string>",
"num_gpus": 1,
"hf": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
},
"base_model": "<string>",
"container_image": "<string>",
"settings": {
"min_instances": 1,
"max_instances": 1
},
"extra_args": [
"<string>"
],
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"enable_prefix_caching": true
},
"preset_id": "<string>"
}
'import requests
url = "https://api.deepinfra.com/deploy/llm"
payload = {
"model_name": "<string>",
"num_gpus": 1,
"hf": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
},
"base_model": "<string>",
"container_image": "<string>",
"settings": {
"min_instances": 1,
"max_instances": 1
},
"extra_args": ["<string>"],
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"enable_prefix_caching": True
},
"preset_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
num_gpus: 1,
hf: {repo: '<string>', revision: '<string>', token: '<string>'},
base_model: '<string>',
container_image: '<string>',
settings: {min_instances: 1, max_instances: 1},
extra_args: ['<string>'],
standard_args: {
max_context_size: 5000000,
max_concurrent_requests: 512,
gpu_memory_fraction: 0.735,
max_prefill_tokens: 65792,
enable_prefix_caching: true
},
preset_id: '<string>'
})
};
fetch('https://api.deepinfra.com/deploy/llm', 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.deepinfra.com/deploy/llm",
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([
'model_name' => '<string>',
'num_gpus' => 1,
'hf' => [
'repo' => '<string>',
'revision' => '<string>',
'token' => '<string>'
],
'base_model' => '<string>',
'container_image' => '<string>',
'settings' => [
'min_instances' => 1,
'max_instances' => 1
],
'extra_args' => [
'<string>'
],
'standard_args' => [
'max_context_size' => 5000000,
'max_concurrent_requests' => 512,
'gpu_memory_fraction' => 0.735,
'max_prefill_tokens' => 65792,
'enable_prefix_caching' => true
],
'preset_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.deepinfra.com/deploy/llm"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"num_gpus\": 1,\n \"hf\": {\n \"repo\": \"<string>\",\n \"revision\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"base_model\": \"<string>\",\n \"container_image\": \"<string>\",\n \"settings\": {\n \"min_instances\": 1,\n \"max_instances\": 1\n },\n \"extra_args\": [\n \"<string>\"\n ],\n \"standard_args\": {\n \"max_context_size\": 5000000,\n \"max_concurrent_requests\": 512,\n \"gpu_memory_fraction\": 0.735,\n \"max_prefill_tokens\": 65792,\n \"enable_prefix_caching\": true\n },\n \"preset_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.deepinfra.com/deploy/llm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"num_gpus\": 1,\n \"hf\": {\n \"repo\": \"<string>\",\n \"revision\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"base_model\": \"<string>\",\n \"container_image\": \"<string>\",\n \"settings\": {\n \"min_instances\": 1,\n \"max_instances\": 1\n },\n \"extra_args\": [\n \"<string>\"\n ],\n \"standard_args\": {\n \"max_context_size\": 5000000,\n \"max_concurrent_requests\": 512,\n \"gpu_memory_fraction\": 0.735,\n \"max_prefill_tokens\": 65792,\n \"enable_prefix_caching\": true\n },\n \"preset_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/deploy/llm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"num_gpus\": 1,\n \"hf\": {\n \"repo\": \"<string>\",\n \"revision\": \"<string>\",\n \"token\": \"<string>\"\n },\n \"base_model\": \"<string>\",\n \"container_image\": \"<string>\",\n \"settings\": {\n \"min_instances\": 1,\n \"max_instances\": 1\n },\n \"extra_args\": [\n \"<string>\"\n ],\n \"standard_args\": {\n \"max_context_size\": 5000000,\n \"max_concurrent_requests\": 512,\n \"gpu_memory_fraction\": 0.735,\n \"max_prefill_tokens\": 65792,\n \"enable_prefix_caching\": true\n },\n \"preset_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deploy_id": "fkj843kjh8",
"model_name": "google/vit-base-patch16-224",
"version": "d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b",
"task": "image-classification",
"status": "deployed",
"fail_reason": "Initialization failed",
"created_at": "2021-08-27T17:19:21+00:00",
"updated_at": "2021-08-27T17:19:21+00:00",
"type": "legacy",
"instances": {
"running": 123,
"pending": 123
},
"config": {
"gpu": "L4-24GB",
"num_gpus": 123,
"max_batch_size": 123,
"weights": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
}
},
"settings": {
"min_instances": 1,
"max_instances": 1
},
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"kv_cache_dtype": "auto",
"enable_prefix_caching": true,
"quantization": "fp8"
},
"extra_args": [
"<string>"
],
"update_error": "<string>",
"rollout": {
"up_to_date": 123,
"outdated": 123,
"booting": 123
}
}{
"error": "Model not found"
}{
"error": "Model not found"
}{
"error": "Model not found"
}{
"error": "Model not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
model name for deepinfra (username/mode-name format)
The type of GPU the deployment is running on.
L4-24GB, L40S-48GB, A100-80GB, H100-80GB, H200-141GB, B200-180GB, B300-270GB, RTXPRO6000-96GB, other Number of GPUs used by one instance
1 <= x <= 8Show child attributes
Show child attributes
Base public model
Docker image for the deployment (e.g. vllm/vllm-openai:v0.8.4)
Show child attributes
Show child attributes
Extra command line arguments for custom deployments
Engine tuning knobs. Values are validated on submission; unsupported or out-of-range values are rejected. Unset knobs use the model/engine defaults.
Show child attributes
Show child attributes
Apply a stored preset or vLLM recipe by id. A non-empty standard_args or extra_args in this request replaces the preset's whole matching field.
Response
Successful Response
Deploy Id
"fkj843kjh8"
Model Id from huggingface
"google/vit-base-patch16-224"
Model version
"d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b"
Task
"image-classification"
Status
"deployed"
Failure reason
"Initialization failed"
Created at
"2021-08-27T17:19:21+00:00"
Updated at
"2021-08-27T17:19:21+00:00"
legacy, llm, lora, tts Details about number of instances running right now
Show child attributes
Show child attributes
Immutable deploy configuration
Show child attributes
Show child attributes
Scale Settings
Show child attributes
Show child attributes
Current engine tuning knobs
Show child attributes
Show child attributes
Current extra engine-specific command-line args (custom-weight deploys only)
If the last config update was auto-reverted after an engine crash-loop, the error that caused it (status stays 'running')
Per-instance rollout progress of the current config
Show child attributes
Show child attributes