Skip to content

How do I upload a file? #92

@zcsoft

Description

@zcsoft

Can I upload files through this repository?

Similar to this API:

https://replicate.com/docs/topics/predictions/input-files

file_input="./path/to/your/file"
file=$(curl -s -X POST "https://api.replicate.com/v1/files" \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H "Content-Type: multipart/form-data" \
  -F "content=@$file_input;type=application/octet-stream;title=$(basename $file_input)")
file_input_url=$(echo "$file" | jq -r '.urls.get')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions