curl --request PATCH \
--url https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"base_url": "<string>",
"display_name": "<string>",
"manual_models": [
"<string>"
]
}
'import requests
url = "https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}"
payload = {
"api_key": "<string>",
"base_url": "<string>",
"display_name": "<string>",
"manual_models": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
base_url: '<string>',
display_name: '<string>',
manual_models: ['<string>']
})
};
fetch('https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{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://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'base_url' => '<string>',
'display_name' => '<string>',
'manual_models' => [
'<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://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"manual_models\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"manual_models\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"manual_models\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"base_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_validated": true,
"last_discovery_error": "<string>",
"manual_models": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}Update a custom endpoint
Update a custom endpoint’s name, base URL, key or manual models. A changed
base_url needs api_key in the same request (400
custom_endpoint_key_required): a stored key is never sent to a new URL.
A new key or URL is validated before saving, with the same codes as create.
A key or URL changed by another request in the meantime is 409
custom_endpoint_changed. An endpoint of another account is 404.
curl --request PATCH \
--url https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"base_url": "<string>",
"display_name": "<string>",
"manual_models": [
"<string>"
]
}
'import requests
url = "https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}"
payload = {
"api_key": "<string>",
"base_url": "<string>",
"display_name": "<string>",
"manual_models": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
base_url: '<string>',
display_name: '<string>',
manual_models: ['<string>']
})
};
fetch('https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{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://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'base_url' => '<string>',
'display_name' => '<string>',
'manual_models' => [
'<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://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"manual_models\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"manual_models\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://neo.api.projectdiscovery.io/api/v1/byok/custom-endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"display_name\": \"<string>\",\n \"manual_models\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"base_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_validated": true,
"last_discovery_error": "<string>",
"manual_models": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}{
"error": "Bad request",
"code": "user_spending_cap_reached",
"error_id": "<string>",
"kind": "forbidden request",
"message": "<string>",
"param": "<string>",
"turnstile_site_key": "<string>"
}Authorizations
JWT authentication token
Path Parameters
Custom endpoint ID
Body
A field that is absent or null is left unchanged. manual_models: []
clears the manual model IDs (refused with endpoint_not_found when the
endpoint has no model list of its own). A malformed field is a 400 with
the code invalid_request.
Response
Custom endpoint updated
A custom OpenAI-compatible endpoint. The API key is never returned.
Normalised https base URL, as the provider documents it (usually ending in /v1)
The user's name for the endpoint, unique per account ignoring case
Whether the key was accepted by the endpoint
Stable code of the last model-list failure (for example endpoint_not_found); null after a successful listing
Model IDs typed by the user

