Skip to main content
POST
/
v1
/
workflow
/
templates
Create Template
curl --request POST \
  --url https://agents.bigdata.com/v1/workflow/templates \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "prompt": "<string>",
  "content_filter": {
    "all_of": [
      {
        "document_ids": [
          "<string>"
        ],
        "type": "<string>"
      }
    ],
    "any_of": [
      {
        "document_ids": [
          "<string>"
        ],
        "type": "<string>"
      }
    ],
    "none_of": [
      {
        "document_ids": [
          "<string>"
        ],
        "type": "<string>"
      }
    ]
  },
  "description": "<string>",
  "expected_input": {},
  "ranking_parameters": {
    "freshness_boost": 5,
    "source_boost": 5
  },
  "research_plan": {
    "title": "<string>",
    "steps": [
      {
        "description": "<string>",
        "status": "NOT_STARTED"
      }
    ]
  },
  "expected_output": "<string>"
}
'
import requests

url = "https://agents.bigdata.com/v1/workflow/templates"

payload = {
"name": "<string>",
"prompt": "<string>",
"content_filter": {
"all_of": [
{
"document_ids": ["<string>"],
"type": "<string>"
}
],
"any_of": [
{
"document_ids": ["<string>"],
"type": "<string>"
}
],
"none_of": [
{
"document_ids": ["<string>"],
"type": "<string>"
}
]
},
"description": "<string>",
"expected_input": {},
"ranking_parameters": {
"freshness_boost": 5,
"source_boost": 5
},
"research_plan": {
"title": "<string>",
"steps": [
{
"description": "<string>",
"status": "NOT_STARTED"
}
]
},
"expected_output": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
prompt: '<string>',
content_filter: {
all_of: [{document_ids: ['<string>'], type: '<string>'}],
any_of: [{document_ids: ['<string>'], type: '<string>'}],
none_of: [{document_ids: ['<string>'], type: '<string>'}]
},
description: '<string>',
expected_input: {},
ranking_parameters: {freshness_boost: 5, source_boost: 5},
research_plan: {title: '<string>', steps: [{description: '<string>', status: 'NOT_STARTED'}]},
expected_output: '<string>'
})
};

fetch('https://agents.bigdata.com/v1/workflow/templates', 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://agents.bigdata.com/v1/workflow/templates",
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>',
'prompt' => '<string>',
'content_filter' => [
'all_of' => [
[
'document_ids' => [
'<string>'
],
'type' => '<string>'
]
],
'any_of' => [
[
'document_ids' => [
'<string>'
],
'type' => '<string>'
]
],
'none_of' => [
[
'document_ids' => [
'<string>'
],
'type' => '<string>'
]
]
],
'description' => '<string>',
'expected_input' => [

],
'ranking_parameters' => [
'freshness_boost' => 5,
'source_boost' => 5
],
'research_plan' => [
'title' => '<string>',
'steps' => [
[
'description' => '<string>',
'status' => 'NOT_STARTED'
]
]
],
'expected_output' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

$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://agents.bigdata.com/v1/workflow/templates"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"content_filter\": {\n \"all_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ],\n \"any_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ],\n \"none_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ]\n },\n \"description\": \"<string>\",\n \"expected_input\": {},\n \"ranking_parameters\": {\n \"freshness_boost\": 5,\n \"source_boost\": 5\n },\n \"research_plan\": {\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"description\": \"<string>\",\n \"status\": \"NOT_STARTED\"\n }\n ]\n },\n \"expected_output\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
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://agents.bigdata.com/v1/workflow/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"content_filter\": {\n \"all_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ],\n \"any_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ],\n \"none_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ]\n },\n \"description\": \"<string>\",\n \"expected_input\": {},\n \"ranking_parameters\": {\n \"freshness_boost\": 5,\n \"source_boost\": 5\n },\n \"research_plan\": {\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"description\": \"<string>\",\n \"status\": \"NOT_STARTED\"\n }\n ]\n },\n \"expected_output\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://agents.bigdata.com/v1/workflow/templates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"content_filter\": {\n \"all_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ],\n \"any_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ],\n \"none_of\": [\n {\n \"document_ids\": [\n \"<string>\"\n ],\n \"type\": \"<string>\"\n }\n ]\n },\n \"description\": \"<string>\",\n \"expected_input\": {},\n \"ranking_parameters\": {\n \"freshness_boost\": 5,\n \"source_boost\": 5\n },\n \"research_plan\": {\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"description\": \"<string>\",\n \"status\": \"NOT_STARTED\"\n }\n ]\n },\n \"expected_output\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "is_community": true,
  "name": "<string>",
  "prompt": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "content_filter": {
    "all_of": [
      {
        "document_ids": [
          "<string>"
        ],
        "type": "<string>"
      }
    ],
    "any_of": [
      {
        "document_ids": [
          "<string>"
        ],
        "type": "<string>"
      }
    ],
    "none_of": [
      {
        "document_ids": [
          "<string>"
        ],
        "type": "<string>"
      }
    ]
  },
  "description": "<string>",
  "expected_input": {},
  "ranking_parameters": {
    "freshness_boost": 5,
    "source_boost": 5
  },
  "research_plan": {
    "title": "<string>",
    "steps": [
      {
        "description": "<string>",
        "status": "NOT_STARTED"
      }
    ]
  },
  "expected_output": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}

Authorizations

X-API-Key
string
header
required

API key for authentication.

Body

application/json

Inline workflow template definition.

name
string
required

Template display name.

prompt
string
required

The research prompt with optional placeholders.

content_filter
ContentFilter · object | null

Content filters applied to all searches.

description
string | null

Brief description of what this template does.

expected_input
Expected Input · object | null

Input placeholders the template expects, keyed by placeholder name.

ranking_parameters
RankingParameters · object | null

Search result ranking configuration.

research_plan
Plan · object | null

Pre-defined research plan for the workflow.

expected_output
string | null

Optional guidance for the final answer's tone, structure, and format.

Minimum string length: 1

Response

Successful Response

A complete workflow template with all metadata.

created_at
string<date-time>
required

When the template was created.

id
string
required

Unique template identifier.

is_community
boolean
required

Whether this is a community-shared template.

name
string
required

Template display name.

prompt
string
required

The research prompt with optional placeholders.

updated_at
string<date-time>
required

When the template was last modified.

content_filter
ContentFilter · object | null

Content filters applied to all searches.

description
string | null

Brief description of what this template does.

expected_input
Expected Input · object | null

Input placeholders, keyed by placeholder name.

ranking_parameters
RankingParameters · object | null

Search result ranking configuration.

research_plan
Plan · object | null

Pre-defined research plan.

expected_output
string | null

Optional guidance for the final answer's tone, structure, and format.

Minimum string length: 1