Skip to main content
POST
/
beta
/
file
Initiate file upload
curl --request POST \
  --url https://api.friendli.ai/beta/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "digest": "<string>",
  "name": "<string>",
  "projectId": "<string>",
  "size": 123
}'
{
  "fileId": "<string>",
  "aws": {},
  "uploadUrl": "<string>"
}
Initiate file upload. To request successfully, it is required to enter a Friendli Token (e.g. flp_XXX) in the Bearer Token field. Refer to the authentication section on our introduction page to learn more and visit here to generate your token.
This API is currently in Beta. While we strive to provide a stable and reliable experience, this feature is still under active development. As a result, you may encounter unexpected behavior or limitations. We encourage you to provide feedback to help us improve the feature before its official release.

Authorizations

Authorization
string
header
required

When using Friendli Suite API for inference requests, you need to provide a Friendli Token for authentication and authorization purposes.

For more detailed information, please refer here.

Headers

X-Friendli-Team
string | null

ID of team to run requests as (optional parameter).

Body

application/json

Initiate file upload request.

digest
string
required

Digest of the file.

name
string
required

Name of the file.

projectId
string
required

ID of the project the file belongs to.

size
integer
required

Size of the file in bytes.

Response

OK - File is already uploaded.

Initiate file upload response.

fileId
string
required

ID of the file.

aws
object | null

AWS fields to be uploaded with file.

uploadUrl
string | null

Upload URL of the file. None if the file is already uploaded.

I