Skip to main content
PUT
/
v1
/
flow
/
files
Upload file
curl --request PUT \
  --url https://flow.seekr.com/v1/flow/files \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'files=<string>' \
  --form 'vector_database_id=<string>'
import requests

url = "https://flow.seekr.com/v1/flow/files"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vector_database_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"Authorization": "<api-key>",
"Content-Type": "multipart/form-data"
}

response = requests.put(url, data=payload, headers=headers)

print(response.text)
const form = new FormData();
form.append('files', '<string>');
form.append('vector_database_id', '<string>');

const options = {method: 'PUT', headers: {Authorization: '<api-key>'}};

options.body = form;

fetch('https://flow.seekr.com/v1/flow/files', 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://flow.seekr.com/v1/flow/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vector_database_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);

$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://flow.seekr.com/v1/flow/files"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vector_database_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--")

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

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://flow.seekr.com/v1/flow/files")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vector_database_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://flow.seekr.com/v1/flow/files")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"vector_database_id\"\r\n\r\n<string>\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "object": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "filename": "<string>",
  "bytes": 123,
  "created_by": "<string>",
  "original_file_id": "<string>",
  "deleted": true
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Purpose values and file formats

Each purpose value requires a specific JSONL schema. Each line of the file must be a valid JSON object matching the format for the chosen purpose.

fine-tune and alignment

Each line requires a messages array of {"role", "content"} objects. Valid roles are system, user, and assistant.
{"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}, {"role": "assistant", "content": "The capital of France is Paris."}]}

preference-fine-tune

Each line requires three fields — messages, chosen, and rejected — each an array of {"role", "content"} objects.
{"messages": [{"role": "user", "content": "What is the capital of France?"}], "chosen": [{"role": "user", "content": "What is the capital of France?"}, {"role": "assistant", "content": "Paris."}], "rejected": [{"role": "user", "content": "What is the capital of France?"}, {"role": "assistant", "content": "Lyon."}]}

pre-train

Each line requires a single text field containing raw training text.
{"text": "Raw training text goes here."}

Authorizations

Authorization
string
header
required

Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.

Body

multipart/form-data
purpose
enum<string>
required
Available options:
reinforcement-fine-tune,
fine-tune,
preference-fine-tune,
pre-train,
alignment
files
string
required
vector_database_id
string | null

Response

Successful Response

Files API response type

id
string
required
object
string
required
Allowed value: "file"
created_at
string<date-time> | null
type
Available options:
jsonl,
parquet,
pt
purpose
enum<string> | null
Available options:
reinforcement-fine-tune,
fine-tune,
preference-fine-tune,
pre-train,
alignment
filename
string | null
bytes
integer | null
created_by
string | null
original_file_id
string | null
deleted
boolean | null
Last modified on June 18, 2026