Create Template Endpoint
POST
/v1/templates
const url = 'http://localhost:8080/v1/templates';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","prompt_overlay":"","json_schema":{},"validation_rules":[{}],"review_thresholds":{},"post_processing":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/v1/templates \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "prompt_overlay": "", "json_schema": {}, "validation_rules": [ {} ], "review_thresholds": {}, "post_processing": {} }'Request Body required
Section titled “Request Body required ” Media type application/json
TemplateCreatePayload
object
name
required
Name
string
prompt_overlay
Prompt Overlay
string
json_schema
required
Json Schema
object
key
additional properties
any
validation_rules
Validation Rules
Array<object>
object
key
additional properties
any
review_thresholds
Review Thresholds
object
key
additional properties
any
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Response Create Template Endpoint V1 Templates Post
object
key
additional properties
any
Example generated
{}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}