firectl instead.
The upload pipeline
Uploading a model via the REST API is a four-step pipeline:- Create the model – Register a model object that references the files you’re about to upload.
- Get upload URLs – Request a signed URL for each file.
- Upload the files – Upload each file directly to its signed URL.
- Validate the upload – Finalize the upload and move the model to
READY.
Why validation is a separate step
Transfer and validation are decoupled because uploads can arrive several ways (signed-URL upload, S3 import, Azure import) and the transfer runs asynchronously on Fireworks infrastructure. ThevalidateUpload call is what:
- Confirms every expected file has landed and is intact.
- Parses your model config to detect architecture, precision, and context length.
- Transitions the model from
UPLOADINGtoREADYso it can be deployed.
validateUpload returns FAILED_PRECONDITION while files are still landing. Poll it until it returns 200 — at that point the model is READY.
Full example
This script runs the entire pipeline end to end. Set your API key, account ID, model ID, and the local folder containing your Hugging Face model files.Set
huggingFaceUrl if this uploaded custom base model should be considered for Fireworks managed fine-tuning. Fireworks uses the Hugging Face URL to infer the training renderer and locate compatible training shapes. The tunability check runs asynchronously about every 30 minutes, so Tunable: true may take up to 30 minutes to appear after the URL is set.Troubleshooting: model stuck in UPLOADING
The most common cause is that validateUpload was never called — files transferring successfully does not move the model to READY on its own. Call the endpoint (and poll it):
FAILED_PRECONDITION, files are still landing — wait and retry. If it keeps failing after the transfer should be complete, confirm that every required file was included.
Next steps
- Verify:
firectl model get accounts/<ACCOUNT_ID>/models/<MODEL_ID>— look forState: READY. - Deploy: see the Custom Models guide for deployment instructions.