Register a schema
Attaches an OpenAPI schema to one release of a model you own. Each release has at most one
schema; to change it, use PUT /models/{id}/schemas/{schema_id}.
Callable by an account_admin or developer of the owning account when model serving is
enabled for the account.
POST
/
models
/
{id}
/
schemas
Register a schema
curl --request POST \
--url https://api.reactor.inc/models/{id}/schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"release": "v1.0.5-ge6187a05",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "your-org/your-model",
"version": "1.0.5"
},
"paths": {}
}
}
'import requests
url = "https://api.reactor.inc/models/{id}/schemas"
payload = {
"release": "v1.0.5-ge6187a05",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "your-org/your-model",
"version": "1.0.5"
},
"paths": {}
}
}
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({
release: 'v1.0.5-ge6187a05',
schema: {
openapi: '3.0.0',
info: {title: 'your-org/your-model', version: '1.0.5'},
paths: {}
}
})
};
fetch('https://api.reactor.inc/models/{id}/schemas', 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.reactor.inc/models/{id}/schemas",
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([
'release' => 'v1.0.5-ge6187a05',
'schema' => [
'openapi' => '3.0.0',
'info' => [
'title' => 'your-org/your-model',
'version' => '1.0.5'
],
'paths' => [
]
]
]),
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.reactor.inc/models/{id}/schemas"
payload := strings.NewReader("{\n \"release\": \"v1.0.5-ge6187a05\",\n \"schema\": {\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"your-org/your-model\",\n \"version\": \"1.0.5\"\n },\n \"paths\": {}\n }\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://api.reactor.inc/models/{id}/schemas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"release\": \"v1.0.5-ge6187a05\",\n \"schema\": {\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"your-org/your-model\",\n \"version\": \"1.0.5\"\n },\n \"paths\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/models/{id}/schemas")
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 \"release\": \"v1.0.5-ge6187a05\",\n \"schema\": {\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"your-org/your-model\",\n \"version\": \"1.0.5\"\n },\n \"paths\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "cf868483-fa9f-4744-a4ce-aa2724e45f0a",
"model_id": "7b3f1bc2-a4e5-4d78-b9c1-0e6c2f9a1d34",
"release": "v1.0.5-ge6187a05",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "your-org/your-model",
"version": "1.0.5"
},
"paths": {}
},
"created_at": "2025-05-11T21:46:40Z",
"updated_at": "2025-05-11T21:46:40Z"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}Authorizations
A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.
Path Parameters
The model's ID (not its project ID). Find it with GET /models?name=your-org/your-model.
Body
application/json
Response
The schema was registered.
The OpenAPI document, stored as sent.
When it was created, as an RFC 3339 timestamp.
Example:
"2026-01-15T10:30:00Z"
When it was last updated, as an RFC 3339 timestamp.
Example:
"2026-01-15T10:30:00Z"
⌘I
Register a schema
curl --request POST \
--url https://api.reactor.inc/models/{id}/schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"release": "v1.0.5-ge6187a05",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "your-org/your-model",
"version": "1.0.5"
},
"paths": {}
}
}
'import requests
url = "https://api.reactor.inc/models/{id}/schemas"
payload = {
"release": "v1.0.5-ge6187a05",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "your-org/your-model",
"version": "1.0.5"
},
"paths": {}
}
}
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({
release: 'v1.0.5-ge6187a05',
schema: {
openapi: '3.0.0',
info: {title: 'your-org/your-model', version: '1.0.5'},
paths: {}
}
})
};
fetch('https://api.reactor.inc/models/{id}/schemas', 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.reactor.inc/models/{id}/schemas",
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([
'release' => 'v1.0.5-ge6187a05',
'schema' => [
'openapi' => '3.0.0',
'info' => [
'title' => 'your-org/your-model',
'version' => '1.0.5'
],
'paths' => [
]
]
]),
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.reactor.inc/models/{id}/schemas"
payload := strings.NewReader("{\n \"release\": \"v1.0.5-ge6187a05\",\n \"schema\": {\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"your-org/your-model\",\n \"version\": \"1.0.5\"\n },\n \"paths\": {}\n }\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://api.reactor.inc/models/{id}/schemas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"release\": \"v1.0.5-ge6187a05\",\n \"schema\": {\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"your-org/your-model\",\n \"version\": \"1.0.5\"\n },\n \"paths\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/models/{id}/schemas")
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 \"release\": \"v1.0.5-ge6187a05\",\n \"schema\": {\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"your-org/your-model\",\n \"version\": \"1.0.5\"\n },\n \"paths\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "cf868483-fa9f-4744-a4ce-aa2724e45f0a",
"model_id": "7b3f1bc2-a4e5-4d78-b9c1-0e6c2f9a1d34",
"release": "v1.0.5-ge6187a05",
"schema": {
"openapi": "3.0.0",
"info": {
"title": "your-org/your-model",
"version": "1.0.5"
},
"paths": {}
},
"created_at": "2025-05-11T21:46:40Z",
"updated_at": "2025-05-11T21:46:40Z"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}