HTTP API
List presets
GET
/v1/presets
const url = 'https://sergo.example.com/v1/presets';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://sergo.example.com/v1/presets \ --header 'Authorization: Bearer <token>'The processing presets the key’s owner can use, and what each does with each file type. Send an id as preset_id when you upload. Personal keys only.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
PresetList
object
items
required
Items
Array<object>
Presetobject
id
required
Id
What to send as preset_id, such as basic
string
name
required
Name
string
description
required
Description
string
availability
required
Availability
admins when only admins can use it
string
uses_model
required
Uses Model
Some file types are read by a language model, for credits
boolean
rules
required
Rules
What it does with each file type
Array<object>
Ruleobject
formats
required
Formats
File types, such as docx
Array<string>
read_as
required
processor
required
uses_model
required
Uses Model
A language model reads these files, for credits
boolean
options
required
Options
Options set on top of the processor’s defaults
object
key
additional properties
any
missing
required
Missing
The processor has never started — files wait until it does
boolean
not_running
required
Not Running
The processor is not running now — files wait until it is
boolean
Example
{ "items": [ { "availability": "admins" } ]}