Create new object.
curl --request POST \
--url https://api.coinfer.ai/api/object \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {
"object_type": "model",
"type": "local",
"env": "<string>",
"name": "",
"content": {
"meta": {
"project_file": "Project.toml",
"entrance_file": "main.jl",
"entrance_func": "model",
"manifest": "Manifest.toml"
},
"tree": [
{
"name": "<string>",
"content": "",
"children": []
}
]
},
"tags": [],
"single_instance": true,
"entrance_file": "",
"lambda_image": false,
"source_url": ""
}
}
'import requests
url = "https://api.coinfer.ai/api/object"
payload = { "payload": {
"object_type": "model",
"type": "local",
"env": "<string>",
"name": "",
"content": {
"meta": {
"project_file": "Project.toml",
"entrance_file": "main.jl",
"entrance_func": "model",
"manifest": "Manifest.toml"
},
"tree": [
{
"name": "<string>",
"content": "",
"children": []
}
]
},
"tags": [],
"single_instance": True,
"entrance_file": "",
"lambda_image": False,
"source_url": ""
} }
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({
payload: {
object_type: 'model',
type: 'local',
env: '<string>',
name: '',
content: {
meta: {
project_file: 'Project.toml',
entrance_file: 'main.jl',
entrance_func: 'model',
manifest: 'Manifest.toml'
},
tree: [{name: '<string>', content: '', children: []}]
},
tags: [],
single_instance: true,
entrance_file: '',
lambda_image: false,
source_url: ''
}
})
};
fetch('https://api.coinfer.ai/api/object', 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.coinfer.ai/api/object",
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([
'payload' => [
'object_type' => 'model',
'type' => 'local',
'env' => '<string>',
'name' => '',
'content' => [
'meta' => [
'project_file' => 'Project.toml',
'entrance_file' => 'main.jl',
'entrance_func' => 'model',
'manifest' => 'Manifest.toml'
],
'tree' => [
[
'name' => '<string>',
'content' => '',
'children' => [
]
]
]
],
'tags' => [
],
'single_instance' => true,
'entrance_file' => '',
'lambda_image' => false,
'source_url' => ''
]
]),
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.coinfer.ai/api/object"
payload := strings.NewReader("{\n \"payload\": {\n \"object_type\": \"model\",\n \"type\": \"local\",\n \"env\": \"<string>\",\n \"name\": \"\",\n \"content\": {\n \"meta\": {\n \"project_file\": \"Project.toml\",\n \"entrance_file\": \"main.jl\",\n \"entrance_func\": \"model\",\n \"manifest\": \"Manifest.toml\"\n },\n \"tree\": [\n {\n \"name\": \"<string>\",\n \"content\": \"\",\n \"children\": []\n }\n ]\n },\n \"tags\": [],\n \"single_instance\": true,\n \"entrance_file\": \"\",\n \"lambda_image\": false,\n \"source_url\": \"\"\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.coinfer.ai/api/object")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {\n \"object_type\": \"model\",\n \"type\": \"local\",\n \"env\": \"<string>\",\n \"name\": \"\",\n \"content\": {\n \"meta\": {\n \"project_file\": \"Project.toml\",\n \"entrance_file\": \"main.jl\",\n \"entrance_func\": \"model\",\n \"manifest\": \"Manifest.toml\"\n },\n \"tree\": [\n {\n \"name\": \"<string>\",\n \"content\": \"\",\n \"children\": []\n }\n ]\n },\n \"tags\": [],\n \"single_instance\": true,\n \"entrance_file\": \"\",\n \"lambda_image\": false,\n \"source_url\": \"\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinfer.ai/api/object")
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 \"payload\": {\n \"object_type\": \"model\",\n \"type\": \"local\",\n \"env\": \"<string>\",\n \"name\": \"\",\n \"content\": {\n \"meta\": {\n \"project_file\": \"Project.toml\",\n \"entrance_file\": \"main.jl\",\n \"entrance_func\": \"model\",\n \"manifest\": \"Manifest.toml\"\n },\n \"tree\": [\n {\n \"name\": \"<string>\",\n \"content\": \"\",\n \"children\": []\n }\n ]\n },\n \"tags\": [],\n \"single_instance\": true,\n \"entrance_file\": \"\",\n \"lambda_image\": false,\n \"source_url\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"object_type": "experiment",
"model_name": "<string>",
"short_id": "",
"name": "",
"model_id": "",
"status": "",
"meta": "<unknown>",
"n_chains": 0,
"n_variables": 0,
"n_samples": 0,
"sample_update_time": "",
"run_on": "",
"input": "<string>",
"output": "<string>",
"workflow_id": "",
"workflow_name": ""
}
}{
"status": "error",
"code": "<string>",
"message": "<string>"
}Object
Create new object.
Create new object.
Example
Create model:
POST /api/object
{
"payload": {
"object_type": "model",
"name": "model name",
"type": "local",
"content": {
"meta": {"entrance_file": "main.jl"},
"tree": [],
}
}
}
Create model from GitHub repo:
POST /api/object
{
"payload": {
"object_type": "model",
"repo": "vectorly-ai/simple-model",
"branch": "main",
"type": "repo",
}
}
Create model from GitHub gist:
POST /api/object
{
"payload": {
"object_type": "model",
"repo": "<the-gist-id>",
"type": "gist",
}
}
Create experiment:
POST /api/object
{
"payload": {
"object_type": "experiment",
"name": "experiment name",
"model_id": "M1234567",
}
}
POST
/
api
/
object
Create new object.
curl --request POST \
--url https://api.coinfer.ai/api/object \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {
"object_type": "model",
"type": "local",
"env": "<string>",
"name": "",
"content": {
"meta": {
"project_file": "Project.toml",
"entrance_file": "main.jl",
"entrance_func": "model",
"manifest": "Manifest.toml"
},
"tree": [
{
"name": "<string>",
"content": "",
"children": []
}
]
},
"tags": [],
"single_instance": true,
"entrance_file": "",
"lambda_image": false,
"source_url": ""
}
}
'import requests
url = "https://api.coinfer.ai/api/object"
payload = { "payload": {
"object_type": "model",
"type": "local",
"env": "<string>",
"name": "",
"content": {
"meta": {
"project_file": "Project.toml",
"entrance_file": "main.jl",
"entrance_func": "model",
"manifest": "Manifest.toml"
},
"tree": [
{
"name": "<string>",
"content": "",
"children": []
}
]
},
"tags": [],
"single_instance": True,
"entrance_file": "",
"lambda_image": False,
"source_url": ""
} }
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({
payload: {
object_type: 'model',
type: 'local',
env: '<string>',
name: '',
content: {
meta: {
project_file: 'Project.toml',
entrance_file: 'main.jl',
entrance_func: 'model',
manifest: 'Manifest.toml'
},
tree: [{name: '<string>', content: '', children: []}]
},
tags: [],
single_instance: true,
entrance_file: '',
lambda_image: false,
source_url: ''
}
})
};
fetch('https://api.coinfer.ai/api/object', 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.coinfer.ai/api/object",
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([
'payload' => [
'object_type' => 'model',
'type' => 'local',
'env' => '<string>',
'name' => '',
'content' => [
'meta' => [
'project_file' => 'Project.toml',
'entrance_file' => 'main.jl',
'entrance_func' => 'model',
'manifest' => 'Manifest.toml'
],
'tree' => [
[
'name' => '<string>',
'content' => '',
'children' => [
]
]
]
],
'tags' => [
],
'single_instance' => true,
'entrance_file' => '',
'lambda_image' => false,
'source_url' => ''
]
]),
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.coinfer.ai/api/object"
payload := strings.NewReader("{\n \"payload\": {\n \"object_type\": \"model\",\n \"type\": \"local\",\n \"env\": \"<string>\",\n \"name\": \"\",\n \"content\": {\n \"meta\": {\n \"project_file\": \"Project.toml\",\n \"entrance_file\": \"main.jl\",\n \"entrance_func\": \"model\",\n \"manifest\": \"Manifest.toml\"\n },\n \"tree\": [\n {\n \"name\": \"<string>\",\n \"content\": \"\",\n \"children\": []\n }\n ]\n },\n \"tags\": [],\n \"single_instance\": true,\n \"entrance_file\": \"\",\n \"lambda_image\": false,\n \"source_url\": \"\"\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.coinfer.ai/api/object")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {\n \"object_type\": \"model\",\n \"type\": \"local\",\n \"env\": \"<string>\",\n \"name\": \"\",\n \"content\": {\n \"meta\": {\n \"project_file\": \"Project.toml\",\n \"entrance_file\": \"main.jl\",\n \"entrance_func\": \"model\",\n \"manifest\": \"Manifest.toml\"\n },\n \"tree\": [\n {\n \"name\": \"<string>\",\n \"content\": \"\",\n \"children\": []\n }\n ]\n },\n \"tags\": [],\n \"single_instance\": true,\n \"entrance_file\": \"\",\n \"lambda_image\": false,\n \"source_url\": \"\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinfer.ai/api/object")
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 \"payload\": {\n \"object_type\": \"model\",\n \"type\": \"local\",\n \"env\": \"<string>\",\n \"name\": \"\",\n \"content\": {\n \"meta\": {\n \"project_file\": \"Project.toml\",\n \"entrance_file\": \"main.jl\",\n \"entrance_func\": \"model\",\n \"manifest\": \"Manifest.toml\"\n },\n \"tree\": [\n {\n \"name\": \"<string>\",\n \"content\": \"\",\n \"children\": []\n }\n ]\n },\n \"tags\": [],\n \"single_instance\": true,\n \"entrance_file\": \"\",\n \"lambda_image\": false,\n \"source_url\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"object_type": "experiment",
"model_name": "<string>",
"short_id": "",
"name": "",
"model_id": "",
"status": "",
"meta": "<unknown>",
"n_chains": 0,
"n_variables": 0,
"n_samples": 0,
"sample_update_time": "",
"run_on": "",
"input": "<string>",
"output": "<string>",
"workflow_id": "",
"workflow_name": ""
}
}{
"status": "error",
"code": "<string>",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
- CreateModel
- CreateExperiment
- CreateExperimentShare
- CreateEventReq
- CreateCallbackReq
- CreateRelationReq
- CreateDataReq
- CreateWorkflowReq
Show child attributes
Show child attributes