playground

Upload Playground File

Changed on

Upload a file for the caller, in a workspace they belong to.

The row is owned by the same principal a Playground completion runs as, so a file_id returned here resolves in the caller's own messages and in nobody else's. POST /api/v1/files takes an API key, which a dashboard session does not hold; this is the session's way in.

post/api/v1/playground/files

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Query parameters

workspace_idstring uuid nullable

Workspace to act in. Defaults to the caller's organization's default workspace. A workspace the caller is not a member of answers 404, as a nonexistent one does.

Response

Successful Response

bytesinteger required
created_atinteger required
expires_atinteger nullable required
filenamestring required
idstring required
object'file'
purposestring required

Changes