Execute a specific tool by passing encrypted parameters.
generateImage(params: { prompt: string }) - Generate images from textaudioGenerateFromText(params: { text: string }) - Text-to-speechcreateFileForUser(params: { fileName: string, fileExtension: string, fileContent: string, mimeType: string }) - Create custom filesimageDescribeAndCaption(params: { fileId: string }) - Describe imagesimageDescribeAndCaptionFallback(params: { fileId: string }) - Alternative image descriptionvideoDescribeAndCaption(params: { fileId: string }) - Describe videosgetPDFContent(params: { fileId: string }) - Extract PDF textgetTextDocumentContent(params: { fileId: string }) - Extract document texttranscribeAudioToText(params: { fileId: string, language?: string }) - Audio transcriptiontranscribeAudioWithDiarization(params: { fileId: string, language?: string }) - Transcription with speakersaudioDiarization(params: { fileId: string }) - Identify speakersgetFileContentOCR(params: { fileId: string }) - OCR on imagesgetSpreadsheetContent(params: { fileId: string }) - Extract spreadsheet datagetDataFileContent(params: { fileId: string }) - Extract data file contentgetPowerPointContent(params: { fileId: string, slideNumbers?: number[] }) - Extract presentation contentgetTime(params: { timezone: string }) - Get current timewebSearchTool(params: { query: string, country?: string, searchLang?: string }) - Web searchwebPageScraperTool(params: { url: string, renderJs?: boolean }) - Scrape web pagessearchRag(params: { query: string }) - Search indexed documents with optional file filtering| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Authorization token |
encryptionKeys | EncryptionKeys | auto-generated | Pre-generated ML-KEM keys |
dekStore | DEKStore | auto-generated | Data encryption keys for files |
requestTimeoutMs | number | 30000 | Request timeout in milliseconds |
maxBufferSize | number | 10485760 | Max SSE buffer size (10MB) |
dek-store.json to version controlSend your access token as header Authorization: Bearer {accessToken}
Your API key that starts with sk_live or sk_test. You can create yours at go.prem.io/api-keys.
The tool identifier (e.g., generateImage, audioGenerateFromText, createFileForUser)
Request for simple tools that don't involve file I/O: webSearchTool, getTime, webPageScraperTool
Tool executed successfully with encrypted response
Status code of the response
200, 201, 202 Response for file-producing tools (generateImage, audioGenerateFromText, createFileForUser)
{
"fileId": "file_encrypted_gen_019ae533-a975-7cbb-9147-4d7583a335e3",
"fileName": "de0b1a99cc4fcb45c1f236b2bb328015375cbe4f...",
"fileSize": 1057063,
"handle": "46b6fb708c5deb249130605bb16cfb98...",
"mimeType": "9b7369da092f69c6efbe24d6db6501ef...",
"s3Path": "agentCreatedFiles/file_encrypted_gen_019ae533-a975-7cbb-9147-4d7583a335e3.enc",
"success": true,
"message": "Image generated successfully and made available for download"
}Message of the response, human readable
"Resource created successfully"
API environment
development, production Error message of the response, human readable
"Invalid email address"
Useful informaiton, not always present, to debug the response
{ "request_id": "req_1234567890" }"Some pertinent log message"
Validator response object, each key is the field name and value is the error message
{
"email": "Invalid email address",
"password": "Password is required"
}Support ID linked to the response, used to identify it when talking with our team
"support_uuidv7-something-else"