Update model
curl --request PUT \
--url https://dev.hub.oxen.ai/api/ai/models/{id} \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://dev.hub.oxen.ai/api/ai/models/{id}"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://dev.hub.oxen.ai/api/ai/models/{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://dev.hub.oxen.ai/api/ai/models/{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([
]),
CURLOPT_HTTPHEADER => [
"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://dev.hub.oxen.ai/api/ai/models/{id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
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://dev.hub.oxen.ai/api/ai/models/{id}")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.hub.oxen.ai/api/ai/models/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"created": 123,
"id": "<string>",
"object": "model",
"owned_by": "<string>",
"capabilities": {
"input": [
"<string>"
],
"output": [
"<string>"
]
},
"deployments": [
{
"status": "active"
}
],
"description": "<string>",
"developer": {
"logo": "<string>",
"name": "<string>"
},
"display_name": "<string>",
"endpoint": "/chat/completions",
"fine_tuning": {
"actions": [
"<string>"
],
"cost_per_second": 123
},
"image_url": "<string>",
"model_type": "base",
"pricing": {
"cost_per_image": 123,
"cost_per_second": 123,
"cost_per_second_high_res": 123,
"cost_per_second_with_audio": 123,
"input_cost_per_token": 123,
"method": "token",
"output_cost_per_token": 123
},
"released_at": "<string>",
"request_schema": {},
"showcase": {
"gallery": [
{
"alt": "<string>",
"src": "<string>",
"category": "<string>",
"details": "<string>",
"prompt": "<string>",
"title": "<string>"
}
],
"hero_image": "<string>",
"tagline": "<string>"
},
"source_model": "<string>",
"summary": "<string>"
}API Reference
Update model
PUT
/
api
/
ai
/
models
/
{id}
Update model
curl --request PUT \
--url https://dev.hub.oxen.ai/api/ai/models/{id} \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://dev.hub.oxen.ai/api/ai/models/{id}"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://dev.hub.oxen.ai/api/ai/models/{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://dev.hub.oxen.ai/api/ai/models/{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([
]),
CURLOPT_HTTPHEADER => [
"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://dev.hub.oxen.ai/api/ai/models/{id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
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://dev.hub.oxen.ai/api/ai/models/{id}")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.hub.oxen.ai/api/ai/models/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"created": 123,
"id": "<string>",
"object": "model",
"owned_by": "<string>",
"capabilities": {
"input": [
"<string>"
],
"output": [
"<string>"
]
},
"deployments": [
{
"status": "active"
}
],
"description": "<string>",
"developer": {
"logo": "<string>",
"name": "<string>"
},
"display_name": "<string>",
"endpoint": "/chat/completions",
"fine_tuning": {
"actions": [
"<string>"
],
"cost_per_second": 123
},
"image_url": "<string>",
"model_type": "base",
"pricing": {
"cost_per_image": 123,
"cost_per_second": 123,
"cost_per_second_high_res": 123,
"cost_per_second_with_audio": 123,
"input_cost_per_token": 123,
"method": "token",
"output_cost_per_token": 123
},
"released_at": "<string>",
"request_schema": {},
"showcase": {
"gallery": [
{
"alt": "<string>",
"src": "<string>",
"category": "<string>",
"details": "<string>",
"prompt": "<string>",
"title": "<string>"
}
],
"hero_image": "<string>",
"tagline": "<string>"
},
"source_model": "<string>",
"summary": "<string>"
}Path Parameters
Body
application/json
Model update params
The body is of type object.
Response
200 - application/json
Updated model
Represents a model available for inference or fine-tuning. Compatible with the OpenAI model object.
Unix timestamp when the model was registered
Model identifier used in API calls
Available options:
model "oxen" for base models, owner namespace for custom models
Show child attributes
Show child attributes
Active deployments. Empty for base models.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
API endpoint to call this model
Available options:
/chat/completions, /images/generate, /videos/generate Fine-tuning info, or null if model is not fine-tuneable
Show child attributes
Show child attributes
Available options:
base, custom Show child attributes
Show child attributes
JSON Schema describing model-specific parameters
Optional marketing content rendered on the public model showcase page
Show child attributes
Show child attributes
Base model this was fine-tuned from