Update AI provider
curl --request PUT \
--url https://api.dualship.run/api/v1/ai/providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"base_url": "<string>",
"is_default": true,
"max_retries": 5,
"name": "<string>",
"priority": 1,
"timeout_seconds": 150
}
'import requests
url = "https://api.dualship.run/api/v1/ai/providers/{id}"
payload = {
"api_key": "<string>",
"base_url": "<string>",
"is_default": True,
"max_retries": 5,
"name": "<string>",
"priority": 1,
"timeout_seconds": 150
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
base_url: '<string>',
is_default: true,
max_retries: 5,
name: '<string>',
priority: 1,
timeout_seconds: 150
})
};
fetch('https://api.dualship.run/api/v1/ai/providers/{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://api.dualship.run/api/v1/ai/providers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'base_url' => '<string>',
'is_default' => true,
'max_retries' => 5,
'name' => '<string>',
'priority' => 1,
'timeout_seconds' => 150
]),
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.dualship.run/api/v1/ai/providers/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"is_default\": true,\n \"max_retries\": 5,\n \"name\": \"<string>\",\n \"priority\": 1,\n \"timeout_seconds\": 150\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.dualship.run/api/v1/ai/providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"is_default\": true,\n \"max_retries\": 5,\n \"name\": \"<string>\",\n \"priority\": 1,\n \"timeout_seconds\": 150\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualship.run/api/v1/ai/providers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"is_default\": true,\n \"max_retries\": 5,\n \"name\": \"<string>\",\n \"priority\": 1,\n \"timeout_seconds\": 150\n}"
response = http.request(request)
puts response.read_body{
"base_url": "<string>",
"created_at": "<string>",
"id": "<string>",
"is_default": true,
"max_retries": 123,
"models": [
"<string>"
],
"name": "<string>",
"priority": 123,
"provider_type": "<string>",
"status": "<string>",
"timeout_seconds": 123,
"updated_at": "<string>"
}{
"code": "BAD_REQUEST",
"error": "invalid request parameters"
}{
"code": "UNAUTHORIZED",
"error": "unauthorized"
}{
"code": "NOT_FOUND",
"error": "resource not found"
}{
"code": "INTERNAL_ERROR",
"error": "internal server error"
}{
"code": "SERVICE_UNAVAILABLE",
"error": "service unavailable"
}ai
Update AI provider
Update an existing AI provider configuration
PUT
/
api
/
v1
/
ai
/
providers
/
{id}
Update AI provider
curl --request PUT \
--url https://api.dualship.run/api/v1/ai/providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_key": "<string>",
"base_url": "<string>",
"is_default": true,
"max_retries": 5,
"name": "<string>",
"priority": 1,
"timeout_seconds": 150
}
'import requests
url = "https://api.dualship.run/api/v1/ai/providers/{id}"
payload = {
"api_key": "<string>",
"base_url": "<string>",
"is_default": True,
"max_retries": 5,
"name": "<string>",
"priority": 1,
"timeout_seconds": 150
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_key: '<string>',
base_url: '<string>',
is_default: true,
max_retries: 5,
name: '<string>',
priority: 1,
timeout_seconds: 150
})
};
fetch('https://api.dualship.run/api/v1/ai/providers/{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://api.dualship.run/api/v1/ai/providers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'api_key' => '<string>',
'base_url' => '<string>',
'is_default' => true,
'max_retries' => 5,
'name' => '<string>',
'priority' => 1,
'timeout_seconds' => 150
]),
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.dualship.run/api/v1/ai/providers/{id}"
payload := strings.NewReader("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"is_default\": true,\n \"max_retries\": 5,\n \"name\": \"<string>\",\n \"priority\": 1,\n \"timeout_seconds\": 150\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.dualship.run/api/v1/ai/providers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"is_default\": true,\n \"max_retries\": 5,\n \"name\": \"<string>\",\n \"priority\": 1,\n \"timeout_seconds\": 150\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualship.run/api/v1/ai/providers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_key\": \"<string>\",\n \"base_url\": \"<string>\",\n \"is_default\": true,\n \"max_retries\": 5,\n \"name\": \"<string>\",\n \"priority\": 1,\n \"timeout_seconds\": 150\n}"
response = http.request(request)
puts response.read_body{
"base_url": "<string>",
"created_at": "<string>",
"id": "<string>",
"is_default": true,
"max_retries": 123,
"models": [
"<string>"
],
"name": "<string>",
"priority": 123,
"provider_type": "<string>",
"status": "<string>",
"timeout_seconds": 123,
"updated_at": "<string>"
}{
"code": "BAD_REQUEST",
"error": "invalid request parameters"
}{
"code": "UNAUTHORIZED",
"error": "unauthorized"
}{
"code": "NOT_FOUND",
"error": "resource not found"
}{
"code": "INTERNAL_ERROR",
"error": "internal server error"
}{
"code": "SERVICE_UNAVAILABLE",
"error": "service unavailable"
}Authorizations
JWT Bearer token authentication
Path Parameters
Provider ID
Body
application/json
Provider details
Minimum string length:
10Required range:
0 <= x <= 10Required string length:
1 - 100Required range:
x >= 0Available options:
active, inactive Required range:
1 <= x <= 300Was this page helpful?
⌘I