File Upload
curl --request PUT \
--url https://flow.seekr.com/v1/flow/files \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form files='@example-file' \
--form 'vector_database_id=<string>'import requests
url = "https://flow.seekr.com/v1/flow/files"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = { "vector_database_id": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.put(url, data=payload, files=files, 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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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": "file",
"created_at": "2023-11-07T05:31:56Z",
"type": "jsonl",
"purpose": "reinforcement-fine-tune",
"filename": "<string>",
"bytes": 123,
"created_by": "<string>",
"original_file_id": "<string>",
"deleted": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Upload file
Upload a file to your organization for use in fine-tuning, alignment, or vector databases.
PUT
/
v1
/
flow
/
files
File Upload
curl --request PUT \
--url https://flow.seekr.com/v1/flow/files \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form files='@example-file' \
--form 'vector_database_id=<string>'import requests
url = "https://flow.seekr.com/v1/flow/files"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = { "vector_database_id": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.put(url, data=payload, files=files, 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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\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": "file",
"created_at": "2023-11-07T05:31:56Z",
"type": "jsonl",
"purpose": "reinforcement-fine-tune",
"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
Eachpurpose 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
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Body
multipart/form-data
Response
Success
Files API response type
Allowed value:
"file"Available options:
jsonl, parquet, pt File purposes accepted by user-facing upload endpoints.
Available options:
reinforcement-fine-tune, fine-tune, preference-fine-tune, pre-train, alignment Last modified on July 31, 2026
Was this page helpful?
⌘I