Uploading Source Files
Uploading Source Files
If a task expects a file, the API payload does not accept file content in Base64 form. For file fields, use one of these approaches:
url— a publichttp/httpsURL that Problembo can download itselffileId— an identifier of a file that you uploaded to Problembo File Store in advance
Option 1: pass a url
This is the simplest option if your file is already available by direct http/https link.
{
"srcImage": {
"url": "https://example.com/input/photo.png",
"origFilename": "photo.png"
}
}
When you submit the task, Problembo downloads the file, uploads it to internal storage, replaces
url with fileId, and then processes the task.
Option 2: upload the file yourself and use fileId
Use this flow for server-to-server integrations when the file is local, private, or you do not want Problembo to download it from a third-party URL.
This upload flow uses API token auth and the /apis/v1/client/files/* endpoints.
Step 1: request a presigned upload URL
curl 'https://problembo.com/apis/v1/client/files/upload-url-for-src' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"origFileName": "photo.png",
"fileSizeBytes": "2458123"
}'
Typical response for a regular single-part upload:
{
"fileId": "910e1b85-4677-49d4-abd3-41218733ab60.png",
"uploadUrl": "https://...",
"contentDisposition": "inline; filename=photo.png",
"origFileName": "photo.png"
}
Step 2: upload the binary file to uploadUrl
curl -X PUT 'UPLOAD_URL_FROM_STEP_1' \
--upload-file ./photo.png
Step 3: confirm the upload
curl 'https://problembo.com/apis/v1/client/files/upload-complete' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"fileId": "910e1b85-4677-49d4-abd3-41218733ab60.png"
}'
Response:
{
"remoteFile": {
"fileId": "910e1b85-4677-49d4-abd3-41218733ab60.png"
}
}
Step 4: use fileId in a task request
For image generation, pass the uploaded file in initImageFileIds to the native image generation
endpoint:
{
"modelId": "waifu-studio-2.6",
"prompt": "turn this photo into an anime illustration",
"imageCount": 1,
"initImageFileIds": ["910e1b85-4677-49d4-abd3-41218733ab60.png"]
}
Submit this body to POST /apis/v1/client/image-gen/tasks. Other native service endpoints expose
their file fields in the service's API contract.
Client upload-flow notes:
forceRouteis not supported in the external client API- there is no separate source-file download endpoint in v1
- any API token from the same Problembo account may reuse this
fileId - native task endpoints validate that every
fileIdbelongs to the token owner and is alreadyACTIVE
Multipart uploads for large files
If step 1 returns multipartPlan, you must use multipart upload instead of a single PUT request.
In that case:
- Upload each chunk to its own
multipartPlan.parts[].uploadUrl - Collect
etagvalues returned by S3-compatible storage - If needed, request refreshed presigned part URLs via
/apis/v1/client/files/multipart-plan - Finalize the upload via
/apis/v1/client/files/upload-multipart-complete
Example request to refresh the multipart plan for an expired part URL:
curl 'https://problembo.com/apis/v1/client/files/multipart-plan' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"fileId": "910e1b85-4677-49d4-abd3-41218733ab60.mp4",
"partNumbers": [2]
}'
Example response:
{
"uploadId": "upload-123",
"partSizeBytes": "5242880",
"parts": [
{
"partNumber": 2,
"uploadUrl": "https://..."
}
]
}
Example finalize request:
curl 'https://problembo.com/apis/v1/client/files/upload-multipart-complete' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"fileId": "910e1b85-4677-49d4-abd3-41218733ab60.mp4",
"parts": [
{ "partNumber": 1, "etag": "etag-part-1" },
{ "partNumber": 2, "etag": "etag-part-2" }
]
}'
{
"remoteFile": {
"fileId": "910e1b85-4677-49d4-abd3-41218733ab60.mp4"
}
}
Which option should you choose?
- Use
/apis/v1/client/files/*for server-to-server uploads authenticated by API token - Use
urlif the file is already available by directhttp/httpslink - Use
fileIdif the file is local, private, large, or generated inside your own system - Do not send Base64 file content inside the task payload
Last updated: March 8, 2026
API Documentation
API tokens are authentication credentials that allow programmatic access to Problembo services. Use tokens to integrate our AI services into your applications, scripts, or workflows.
Prompt Enhancement API
How to synchronously enhance image and video generation prompts through the Problembo Client API, pass image inputs, and handle errors.