Create External Deployment
curl --request POST \
--url https://{host}/api/model-deployments/external \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project_key": "<string>"
}
'import requests
url = "https://{host}/api/model-deployments/external"
payload = {
"name": "<string>",
"project_key": "<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({name: '<string>', project_key: '<string>'})
};
fetch('https://{host}/api/model-deployments/external', 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://{host}/api/model-deployments/external",
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([
'name' => '<string>',
'project_key' => '<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://{host}/api/model-deployments/external"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project_key\": \"<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://{host}/api/model-deployments/external")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/model-deployments/external")
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 \"name\": \"<string>\",\n \"project_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deployment": {
"id": "<string>",
"name": "<string>",
"owner_user_id": 123,
"owner_username": "<string>",
"desired_state": "<string>",
"status": "<string>",
"endpoint_path": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"project_key": "<string>",
"fleet_id": "",
"serve_mode": "proxied",
"current_revision_id": "<string>",
"candidate_revision_id": "<string>",
"last_error": "<string>",
"current_revision": {
"id": "<string>",
"deployment_id": "<string>",
"sequence": 123,
"engine": "<string>",
"model_source": {},
"config": {},
"status": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"runtime_ref": "<string>",
"runtime_meta": {},
"internal_endpoint": "<string>",
"error": "<string>",
"ready_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z"
},
"candidate_revision": {
"id": "<string>",
"deployment_id": "<string>",
"sequence": 123,
"engine": "<string>",
"model_source": {},
"config": {},
"status": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"runtime_ref": "<string>",
"runtime_meta": {},
"internal_endpoint": "<string>",
"error": "<string>",
"ready_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z"
},
"revisions": [
{
"id": "<string>",
"deployment_id": "<string>",
"sequence": 123,
"engine": "<string>",
"model_source": {},
"config": {},
"status": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"runtime_ref": "<string>",
"runtime_meta": {},
"internal_endpoint": "<string>",
"error": "<string>",
"ready_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z"
}
],
"tokens": [
{
"id": "<string>",
"deployment_id": "<string>",
"name": "<string>",
"prefix": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
],
"reflow_sample_rate": 0,
"reflow_retention_days": 30,
"reflow_capture_system_prompt": true,
"reflow_dropped_total": 0,
"reflow_trimmed_total": 0
},
"initial_token": {
"id": "<string>",
"deployment_id": "<string>",
"name": "<string>",
"prefix": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"token": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create External Deployment
Register a serving stack the platform does not run, so its traffic can come back.
No model, no Fleet, no cards and no release check: nothing is launched, so there is nothing to admit. What is created is the return path — a deployment identity to own the Reflow Buffer, and the Deployment Token the external service presents when it reports its exchanges. Capture starts off, as it does everywhere: keeping production traffic is somebody’s decision.
POST
/
api
/
model-deployments
/
external
Create External Deployment
curl --request POST \
--url https://{host}/api/model-deployments/external \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project_key": "<string>"
}
'import requests
url = "https://{host}/api/model-deployments/external"
payload = {
"name": "<string>",
"project_key": "<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({name: '<string>', project_key: '<string>'})
};
fetch('https://{host}/api/model-deployments/external', 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://{host}/api/model-deployments/external",
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([
'name' => '<string>',
'project_key' => '<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://{host}/api/model-deployments/external"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project_key\": \"<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://{host}/api/model-deployments/external")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/model-deployments/external")
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 \"name\": \"<string>\",\n \"project_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deployment": {
"id": "<string>",
"name": "<string>",
"owner_user_id": 123,
"owner_username": "<string>",
"desired_state": "<string>",
"status": "<string>",
"endpoint_path": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"project_key": "<string>",
"fleet_id": "",
"serve_mode": "proxied",
"current_revision_id": "<string>",
"candidate_revision_id": "<string>",
"last_error": "<string>",
"current_revision": {
"id": "<string>",
"deployment_id": "<string>",
"sequence": 123,
"engine": "<string>",
"model_source": {},
"config": {},
"status": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"runtime_ref": "<string>",
"runtime_meta": {},
"internal_endpoint": "<string>",
"error": "<string>",
"ready_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z"
},
"candidate_revision": {
"id": "<string>",
"deployment_id": "<string>",
"sequence": 123,
"engine": "<string>",
"model_source": {},
"config": {},
"status": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"runtime_ref": "<string>",
"runtime_meta": {},
"internal_endpoint": "<string>",
"error": "<string>",
"ready_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z"
},
"revisions": [
{
"id": "<string>",
"deployment_id": "<string>",
"sequence": 123,
"engine": "<string>",
"model_source": {},
"config": {},
"status": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"runtime_ref": "<string>",
"runtime_meta": {},
"internal_endpoint": "<string>",
"error": "<string>",
"ready_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z"
}
],
"tokens": [
{
"id": "<string>",
"deployment_id": "<string>",
"name": "<string>",
"prefix": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
],
"reflow_sample_rate": 0,
"reflow_retention_days": 30,
"reflow_capture_system_prompt": true,
"reflow_dropped_total": 0,
"reflow_trimmed_total": 0
},
"initial_token": {
"id": "<string>",
"deployment_id": "<string>",
"name": "<string>",
"prefix": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"token": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json