Upload a file to the file service.Documentation Index
Fetch the complete documentation index at: https://platform.stepfun.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
POST https://api.stepfun.ai/v1/files
Request body
-
purposestringrequired
Upload intent. Onlystorageis supported for file uploads (image/video understanding, voice cloning, etc.). -
urlstringoptional
Remote file URL. Supported formats match thefilefield. If bothfileandurlare provided,filetakes precedence. -
fileFileoptional
File to upload. Each user can upload up to 1,000 files. Omit when usingurl.
storagesupported formats (max 128 MB):- Video (mp4)
- Images (jpg/jpeg, png, webp, static gif)
- Audio (mp3, wav). For voice cloning, audio length should be 5–10 seconds.
Response
Returns a single File object.Examples
- python
- js
- curl