Skip to Content
Asteria Docs
Files

Upload File

Upload a file and return an id `chat/completions` can reference.

POST
/v1/files

Authorization

ApiKey
headerAuthorization<token>

Your API key (sk-ast-...)

Request Body

multipart/form-data
  1. body
file*File
purpose?Purpose
Default"assistants"

Response Body

Successful Response

application/json
  1. response

The OpenAI Files API object shape, which every SDK already parses.

id*Id
object?Object
Default"file"
bytes*Bytes
created_at*Created At

Unix seconds, as OpenAI returns it.

filename*Filename
purpose*Purpose
Example Request
curl -X POST 'https://api.asteria-labs.com/v1/files' \  -F 'file=string'
Example Response
{  "id": "string",  "object": "file",  "bytes": 0,  "created_at": 0,  "filename": "string",  "purpose": "string"}