For the complete documentation index, see llms.txt. This page is also available as Markdown.

Upload File

Upload a file

post
/v0/files
Authorizations
Api-KeystringRequired
Body
filestring · binaryRequired

File to upload

Responses
200

File uploaded successfully

application/json
idstring · uuidOptional

Unique identifier for the uploaded file

namestringOptional

Original filename

typestringOptional

Content type of the file

post/v0/files
const form = new FormData();
form.append('file', fs.createReadStream('path/to/your/file.pdf'));

const response = await fetch('https://api.alignlabs.dev/v0/files', {
  method: 'POST',
  headers: {
    'Api-Key': 'YOUR_API_KEY'
  },
  body: form
});

const data = await response.json();
200

File uploaded successfully

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "type": "text"
}

Last updated