curl --request POST \
--url https://api.twinbay.ai/seeds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"twin": "<string>",
"prompt": "<string>"
}
'import requests
url = "https://api.twinbay.ai/seeds"
payload = {
"name": "<string>",
"twin": "<string>",
"prompt": "<string>"
}
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({name: '<string>', twin: '<string>', prompt: '<string>'})
};
fetch('https://api.twinbay.ai/seeds', 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.twinbay.ai/seeds",
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([
'name' => '<string>',
'twin' => '<string>',
'prompt' => '<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://api.twinbay.ai/seeds"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"twin\": \"<string>\",\n \"prompt\": \"<string>\"\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.twinbay.ai/seeds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"twin\": \"<string>\",\n \"prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twinbay.ai/seeds")
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 \"name\": \"<string>\",\n \"twin\": \"<string>\",\n \"prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"twin": "<string>",
"prompt": "<string>",
"status": "<string>",
"usable": true,
"created_at": "2023-11-07T05:31:56Z",
"failure": "<string>",
"twin_version": "<string>",
"size_bytes": 123,
"completed_at": "2023-11-07T05:31:56Z"
}Generate a seed
Describes the starting state you want and answers immediately; a worker expands it into rows. Read the seed until it is ready, then pass its id as a twin’s seed when you create an environment.
curl --request POST \
--url https://api.twinbay.ai/seeds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"twin": "<string>",
"prompt": "<string>"
}
'import requests
url = "https://api.twinbay.ai/seeds"
payload = {
"name": "<string>",
"twin": "<string>",
"prompt": "<string>"
}
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({name: '<string>', twin: '<string>', prompt: '<string>'})
};
fetch('https://api.twinbay.ai/seeds', 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.twinbay.ai/seeds",
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([
'name' => '<string>',
'twin' => '<string>',
'prompt' => '<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://api.twinbay.ai/seeds"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"twin\": \"<string>\",\n \"prompt\": \"<string>\"\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.twinbay.ai/seeds")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"twin\": \"<string>\",\n \"prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twinbay.ai/seeds")
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 \"name\": \"<string>\",\n \"twin\": \"<string>\",\n \"prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"twin": "<string>",
"prompt": "<string>",
"status": "<string>",
"usable": true,
"created_at": "2023-11-07T05:31:56Z",
"failure": "<string>",
"twin_version": "<string>",
"size_bytes": 123,
"completed_at": "2023-11-07T05:31:56Z"
}Authorizations
Access token issued by WorkOS AuthKit.
Body
Display name of the seed
1 - 100Slug of the twin this seed is for
1 - 100The starting state you want, in your own words. "50 open tickets, half of them aging past 90 days."
1 - 2000Response
Successful Response
The twin this seed can be loaded into.
The starting state this seed was asked for.
pending, running, ready or failed
Whether the twin's current release can still load this seed. False means the twin's storage changed since it was generated, so it has to be generated again.
Why generation failed, if it did.
The release this seed was generated against.