GenAI
Create a new Gen AI Endpoint
Create a new Gen AI Endpoint
POST
/
api
/
gen-ai
/
beta
/
endpoints
Create a new Gen AI Endpoint
curl --request POST \
--url https://mycluster.domino.tech/api/gen-ai/beta/endpoints \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"collaborators": [
{
"name": "John Doe",
"organizationId": "62313ce67a0af0281c01a6a5",
"userId": "62313ce67a0af0281c01a6a5"
}
],
"configuration": {
"maxNumberOfSequences": 256,
"servedModelName": "my-model",
"tensorParallelism": 1,
"vllmArguments": "--max-model-length 4095 --gpu-memory-utilization 0.90"
},
"environment": {
"environmentId": "62313ce67a0af0281c01a6a5",
"revisionId": "62313ce67a0af0281c01a6a5"
},
"hardwareTierId": "62313ce67a0af0281c01a6a5",
"modelSource": {},
"name": "My Endpoint",
"projectId": "62313ce67a0af0281c01a6a5",
"description": "My Endpoint Description",
"vanityUrl": "https://mycluster.domino.tech/endpoints/my-endpoint",
"versionDescription": "My Endpoint Version Description",
"versionLabel": 1
}
'import requests
url = "https://mycluster.domino.tech/api/gen-ai/beta/endpoints"
payload = {
"collaborators": [
{
"name": "John Doe",
"organizationId": "62313ce67a0af0281c01a6a5",
"userId": "62313ce67a0af0281c01a6a5"
}
],
"configuration": {
"maxNumberOfSequences": 256,
"servedModelName": "my-model",
"tensorParallelism": 1,
"vllmArguments": "--max-model-length 4095 --gpu-memory-utilization 0.90"
},
"environment": {
"environmentId": "62313ce67a0af0281c01a6a5",
"revisionId": "62313ce67a0af0281c01a6a5"
},
"hardwareTierId": "62313ce67a0af0281c01a6a5",
"modelSource": {},
"name": "My Endpoint",
"projectId": "62313ce67a0af0281c01a6a5",
"description": "My Endpoint Description",
"vanityUrl": "https://mycluster.domino.tech/endpoints/my-endpoint",
"versionDescription": "My Endpoint Version Description",
"versionLabel": 1
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collaborators: [
{
name: 'John Doe',
organizationId: '62313ce67a0af0281c01a6a5',
userId: '62313ce67a0af0281c01a6a5'
}
],
configuration: {
maxNumberOfSequences: 256,
servedModelName: 'my-model',
tensorParallelism: 1,
vllmArguments: '--max-model-length 4095 --gpu-memory-utilization 0.90'
},
environment: {
environmentId: '62313ce67a0af0281c01a6a5',
revisionId: '62313ce67a0af0281c01a6a5'
},
hardwareTierId: '62313ce67a0af0281c01a6a5',
modelSource: {},
name: 'My Endpoint',
projectId: '62313ce67a0af0281c01a6a5',
description: 'My Endpoint Description',
vanityUrl: 'https://mycluster.domino.tech/endpoints/my-endpoint',
versionDescription: 'My Endpoint Version Description',
versionLabel: 1
})
};
fetch('https://mycluster.domino.tech/api/gen-ai/beta/endpoints', 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://mycluster.domino.tech/api/gen-ai/beta/endpoints",
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([
'collaborators' => [
[
'name' => 'John Doe',
'organizationId' => '62313ce67a0af0281c01a6a5',
'userId' => '62313ce67a0af0281c01a6a5'
]
],
'configuration' => [
'maxNumberOfSequences' => 256,
'servedModelName' => 'my-model',
'tensorParallelism' => 1,
'vllmArguments' => '--max-model-length 4095 --gpu-memory-utilization 0.90'
],
'environment' => [
'environmentId' => '62313ce67a0af0281c01a6a5',
'revisionId' => '62313ce67a0af0281c01a6a5'
],
'hardwareTierId' => '62313ce67a0af0281c01a6a5',
'modelSource' => [
],
'name' => 'My Endpoint',
'projectId' => '62313ce67a0af0281c01a6a5',
'description' => 'My Endpoint Description',
'vanityUrl' => 'https://mycluster.domino.tech/endpoints/my-endpoint',
'versionDescription' => 'My Endpoint Version Description',
'versionLabel' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/gen-ai/beta/endpoints"
payload := strings.NewReader("{\n \"collaborators\": [\n {\n \"name\": \"John Doe\",\n \"organizationId\": \"62313ce67a0af0281c01a6a5\",\n \"userId\": \"62313ce67a0af0281c01a6a5\"\n }\n ],\n \"configuration\": {\n \"maxNumberOfSequences\": 256,\n \"servedModelName\": \"my-model\",\n \"tensorParallelism\": 1,\n \"vllmArguments\": \"--max-model-length 4095 --gpu-memory-utilization 0.90\"\n },\n \"environment\": {\n \"environmentId\": \"62313ce67a0af0281c01a6a5\",\n \"revisionId\": \"62313ce67a0af0281c01a6a5\"\n },\n \"hardwareTierId\": \"62313ce67a0af0281c01a6a5\",\n \"modelSource\": {},\n \"name\": \"My Endpoint\",\n \"projectId\": \"62313ce67a0af0281c01a6a5\",\n \"description\": \"My Endpoint Description\",\n \"vanityUrl\": \"https://mycluster.domino.tech/endpoints/my-endpoint\",\n \"versionDescription\": \"My Endpoint Version Description\",\n \"versionLabel\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
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://mycluster.domino.tech/api/gen-ai/beta/endpoints")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collaborators\": [\n {\n \"name\": \"John Doe\",\n \"organizationId\": \"62313ce67a0af0281c01a6a5\",\n \"userId\": \"62313ce67a0af0281c01a6a5\"\n }\n ],\n \"configuration\": {\n \"maxNumberOfSequences\": 256,\n \"servedModelName\": \"my-model\",\n \"tensorParallelism\": 1,\n \"vllmArguments\": \"--max-model-length 4095 --gpu-memory-utilization 0.90\"\n },\n \"environment\": {\n \"environmentId\": \"62313ce67a0af0281c01a6a5\",\n \"revisionId\": \"62313ce67a0af0281c01a6a5\"\n },\n \"hardwareTierId\": \"62313ce67a0af0281c01a6a5\",\n \"modelSource\": {},\n \"name\": \"My Endpoint\",\n \"projectId\": \"62313ce67a0af0281c01a6a5\",\n \"description\": \"My Endpoint Description\",\n \"vanityUrl\": \"https://mycluster.domino.tech/endpoints/my-endpoint\",\n \"versionDescription\": \"My Endpoint Version Description\",\n \"versionLabel\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/gen-ai/beta/endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collaborators\": [\n {\n \"name\": \"John Doe\",\n \"organizationId\": \"62313ce67a0af0281c01a6a5\",\n \"userId\": \"62313ce67a0af0281c01a6a5\"\n }\n ],\n \"configuration\": {\n \"maxNumberOfSequences\": 256,\n \"servedModelName\": \"my-model\",\n \"tensorParallelism\": 1,\n \"vllmArguments\": \"--max-model-length 4095 --gpu-memory-utilization 0.90\"\n },\n \"environment\": {\n \"environmentId\": \"62313ce67a0af0281c01a6a5\",\n \"revisionId\": \"62313ce67a0af0281c01a6a5\"\n },\n \"hardwareTierId\": \"62313ce67a0af0281c01a6a5\",\n \"modelSource\": {},\n \"name\": \"My Endpoint\",\n \"projectId\": \"62313ce67a0af0281c01a6a5\",\n \"description\": \"My Endpoint Description\",\n \"vanityUrl\": \"https://mycluster.domino.tech/endpoints/my-endpoint\",\n \"versionDescription\": \"My Endpoint Version Description\",\n \"versionLabel\": 1\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2022-03-12T02:13:44.467Z",
"creator": {
"id": "integration test",
"name": "Full User Name"
},
"generalAccess": "Restricted",
"id": "62313ce67a0af0281c01a6a5",
"name": "My Endpoint",
"project": {
"id": "62313ce67a0af0281c01a6a5",
"name": "My Project",
"owner": {
"id": "integration test",
"name": "Full User Name"
}
},
"updatedAt": "2022-03-12T02:13:44.467Z",
"url": "https://mycluster.domino.tech/endpoint/my-endpoint",
"vanityUrl": "https://mycluster.domino.tech/endpoints/my-endpoint",
"currentVersion": {
"configuration": {
"maxNumberOfSequences": 256,
"servedModelName": "my-model",
"tensorParallelism": 1,
"vllmArguments": "--max-model-length 4095 --gpu-memory-utilization 0.90"
},
"createdAt": "2022-03-12T02:13:44.467Z",
"creator": {
"id": "integration test",
"name": "Full User Name"
},
"endpointId": "62313ce67a0af0281c01a6a5",
"environment": {
"id": "62313ce67a0af0281c01a6a5",
"name": "My Environment",
"revisionId": "62313ce67a0af0281c01a6a5"
},
"hardwareTier": {
"dataPlaneId": "62313ce67a0af0281c01a6a5",
"dataPlaneName": "My Data Plane",
"id": "62313ce67a0af0281c01a6a5"
},
"modelSource": {
"huggingFace": {
"commit": "62313ce67a0af0281c01a6a5",
"modelType": "LLM",
"path": "my-model",
"apiToken": "62313ce67a0af0281c01a6a5"
},
"registeredModel": {
"modelName": "RandomForestRegression",
"modelVersion": 1
}
},
"modelType": "LLM",
"number": 1,
"status": "Building",
"description": "My Endpoint Version Description",
"executionId": "62313ce67a0af0281c01a6a5",
"label": 1
},
"description": "My Endpoint Description",
"instructions": "Use the endpoint to generate text",
"requestCount": 100
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Details of the Gen AI Endpoint to create
Response
Success
Was this page helpful?
⌘I
Create a new Gen AI Endpoint
curl --request POST \
--url https://mycluster.domino.tech/api/gen-ai/beta/endpoints \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"collaborators": [
{
"name": "John Doe",
"organizationId": "62313ce67a0af0281c01a6a5",
"userId": "62313ce67a0af0281c01a6a5"
}
],
"configuration": {
"maxNumberOfSequences": 256,
"servedModelName": "my-model",
"tensorParallelism": 1,
"vllmArguments": "--max-model-length 4095 --gpu-memory-utilization 0.90"
},
"environment": {
"environmentId": "62313ce67a0af0281c01a6a5",
"revisionId": "62313ce67a0af0281c01a6a5"
},
"hardwareTierId": "62313ce67a0af0281c01a6a5",
"modelSource": {},
"name": "My Endpoint",
"projectId": "62313ce67a0af0281c01a6a5",
"description": "My Endpoint Description",
"vanityUrl": "https://mycluster.domino.tech/endpoints/my-endpoint",
"versionDescription": "My Endpoint Version Description",
"versionLabel": 1
}
'import requests
url = "https://mycluster.domino.tech/api/gen-ai/beta/endpoints"
payload = {
"collaborators": [
{
"name": "John Doe",
"organizationId": "62313ce67a0af0281c01a6a5",
"userId": "62313ce67a0af0281c01a6a5"
}
],
"configuration": {
"maxNumberOfSequences": 256,
"servedModelName": "my-model",
"tensorParallelism": 1,
"vllmArguments": "--max-model-length 4095 --gpu-memory-utilization 0.90"
},
"environment": {
"environmentId": "62313ce67a0af0281c01a6a5",
"revisionId": "62313ce67a0af0281c01a6a5"
},
"hardwareTierId": "62313ce67a0af0281c01a6a5",
"modelSource": {},
"name": "My Endpoint",
"projectId": "62313ce67a0af0281c01a6a5",
"description": "My Endpoint Description",
"vanityUrl": "https://mycluster.domino.tech/endpoints/my-endpoint",
"versionDescription": "My Endpoint Version Description",
"versionLabel": 1
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collaborators: [
{
name: 'John Doe',
organizationId: '62313ce67a0af0281c01a6a5',
userId: '62313ce67a0af0281c01a6a5'
}
],
configuration: {
maxNumberOfSequences: 256,
servedModelName: 'my-model',
tensorParallelism: 1,
vllmArguments: '--max-model-length 4095 --gpu-memory-utilization 0.90'
},
environment: {
environmentId: '62313ce67a0af0281c01a6a5',
revisionId: '62313ce67a0af0281c01a6a5'
},
hardwareTierId: '62313ce67a0af0281c01a6a5',
modelSource: {},
name: 'My Endpoint',
projectId: '62313ce67a0af0281c01a6a5',
description: 'My Endpoint Description',
vanityUrl: 'https://mycluster.domino.tech/endpoints/my-endpoint',
versionDescription: 'My Endpoint Version Description',
versionLabel: 1
})
};
fetch('https://mycluster.domino.tech/api/gen-ai/beta/endpoints', 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://mycluster.domino.tech/api/gen-ai/beta/endpoints",
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([
'collaborators' => [
[
'name' => 'John Doe',
'organizationId' => '62313ce67a0af0281c01a6a5',
'userId' => '62313ce67a0af0281c01a6a5'
]
],
'configuration' => [
'maxNumberOfSequences' => 256,
'servedModelName' => 'my-model',
'tensorParallelism' => 1,
'vllmArguments' => '--max-model-length 4095 --gpu-memory-utilization 0.90'
],
'environment' => [
'environmentId' => '62313ce67a0af0281c01a6a5',
'revisionId' => '62313ce67a0af0281c01a6a5'
],
'hardwareTierId' => '62313ce67a0af0281c01a6a5',
'modelSource' => [
],
'name' => 'My Endpoint',
'projectId' => '62313ce67a0af0281c01a6a5',
'description' => 'My Endpoint Description',
'vanityUrl' => 'https://mycluster.domino.tech/endpoints/my-endpoint',
'versionDescription' => 'My Endpoint Version Description',
'versionLabel' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/gen-ai/beta/endpoints"
payload := strings.NewReader("{\n \"collaborators\": [\n {\n \"name\": \"John Doe\",\n \"organizationId\": \"62313ce67a0af0281c01a6a5\",\n \"userId\": \"62313ce67a0af0281c01a6a5\"\n }\n ],\n \"configuration\": {\n \"maxNumberOfSequences\": 256,\n \"servedModelName\": \"my-model\",\n \"tensorParallelism\": 1,\n \"vllmArguments\": \"--max-model-length 4095 --gpu-memory-utilization 0.90\"\n },\n \"environment\": {\n \"environmentId\": \"62313ce67a0af0281c01a6a5\",\n \"revisionId\": \"62313ce67a0af0281c01a6a5\"\n },\n \"hardwareTierId\": \"62313ce67a0af0281c01a6a5\",\n \"modelSource\": {},\n \"name\": \"My Endpoint\",\n \"projectId\": \"62313ce67a0af0281c01a6a5\",\n \"description\": \"My Endpoint Description\",\n \"vanityUrl\": \"https://mycluster.domino.tech/endpoints/my-endpoint\",\n \"versionDescription\": \"My Endpoint Version Description\",\n \"versionLabel\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
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://mycluster.domino.tech/api/gen-ai/beta/endpoints")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collaborators\": [\n {\n \"name\": \"John Doe\",\n \"organizationId\": \"62313ce67a0af0281c01a6a5\",\n \"userId\": \"62313ce67a0af0281c01a6a5\"\n }\n ],\n \"configuration\": {\n \"maxNumberOfSequences\": 256,\n \"servedModelName\": \"my-model\",\n \"tensorParallelism\": 1,\n \"vllmArguments\": \"--max-model-length 4095 --gpu-memory-utilization 0.90\"\n },\n \"environment\": {\n \"environmentId\": \"62313ce67a0af0281c01a6a5\",\n \"revisionId\": \"62313ce67a0af0281c01a6a5\"\n },\n \"hardwareTierId\": \"62313ce67a0af0281c01a6a5\",\n \"modelSource\": {},\n \"name\": \"My Endpoint\",\n \"projectId\": \"62313ce67a0af0281c01a6a5\",\n \"description\": \"My Endpoint Description\",\n \"vanityUrl\": \"https://mycluster.domino.tech/endpoints/my-endpoint\",\n \"versionDescription\": \"My Endpoint Version Description\",\n \"versionLabel\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/gen-ai/beta/endpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collaborators\": [\n {\n \"name\": \"John Doe\",\n \"organizationId\": \"62313ce67a0af0281c01a6a5\",\n \"userId\": \"62313ce67a0af0281c01a6a5\"\n }\n ],\n \"configuration\": {\n \"maxNumberOfSequences\": 256,\n \"servedModelName\": \"my-model\",\n \"tensorParallelism\": 1,\n \"vllmArguments\": \"--max-model-length 4095 --gpu-memory-utilization 0.90\"\n },\n \"environment\": {\n \"environmentId\": \"62313ce67a0af0281c01a6a5\",\n \"revisionId\": \"62313ce67a0af0281c01a6a5\"\n },\n \"hardwareTierId\": \"62313ce67a0af0281c01a6a5\",\n \"modelSource\": {},\n \"name\": \"My Endpoint\",\n \"projectId\": \"62313ce67a0af0281c01a6a5\",\n \"description\": \"My Endpoint Description\",\n \"vanityUrl\": \"https://mycluster.domino.tech/endpoints/my-endpoint\",\n \"versionDescription\": \"My Endpoint Version Description\",\n \"versionLabel\": 1\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2022-03-12T02:13:44.467Z",
"creator": {
"id": "integration test",
"name": "Full User Name"
},
"generalAccess": "Restricted",
"id": "62313ce67a0af0281c01a6a5",
"name": "My Endpoint",
"project": {
"id": "62313ce67a0af0281c01a6a5",
"name": "My Project",
"owner": {
"id": "integration test",
"name": "Full User Name"
}
},
"updatedAt": "2022-03-12T02:13:44.467Z",
"url": "https://mycluster.domino.tech/endpoint/my-endpoint",
"vanityUrl": "https://mycluster.domino.tech/endpoints/my-endpoint",
"currentVersion": {
"configuration": {
"maxNumberOfSequences": 256,
"servedModelName": "my-model",
"tensorParallelism": 1,
"vllmArguments": "--max-model-length 4095 --gpu-memory-utilization 0.90"
},
"createdAt": "2022-03-12T02:13:44.467Z",
"creator": {
"id": "integration test",
"name": "Full User Name"
},
"endpointId": "62313ce67a0af0281c01a6a5",
"environment": {
"id": "62313ce67a0af0281c01a6a5",
"name": "My Environment",
"revisionId": "62313ce67a0af0281c01a6a5"
},
"hardwareTier": {
"dataPlaneId": "62313ce67a0af0281c01a6a5",
"dataPlaneName": "My Data Plane",
"id": "62313ce67a0af0281c01a6a5"
},
"modelSource": {
"huggingFace": {
"commit": "62313ce67a0af0281c01a6a5",
"modelType": "LLM",
"path": "my-model",
"apiToken": "62313ce67a0af0281c01a6a5"
},
"registeredModel": {
"modelName": "RandomForestRegression",
"modelVersion": 1
}
},
"modelType": "LLM",
"number": 1,
"status": "Building",
"description": "My Endpoint Version Description",
"executionId": "62313ce67a0af0281c01a6a5",
"label": 1
},
"description": "My Endpoint Description",
"instructions": "Use the endpoint to generate text",
"requestCount": 100
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"error": "<string>"
}