Start Upload
POST
https://api.youvico.com/api/projects/:id/generation-attachments/upload.multipart- MCP Tool
- Not Supported
- Rate Limit
- Tier 3
- Scope
- ai:generate
Starts uploading a reference file for Generate File. Available only in projects of the workspace your API key or connection belongs to, not in projects another workspace has linked to it.
- Complete the upload within 24 hours of starting it.
- Use the attachment in Generate File within 23 hours of starting the upload.
- Attachments you started uploading in the last 24 hours can total up to 10 GB.
Note
- Split the file into 100,000,000-byte parts from the start. The last part holds whatever remains.
- Within 30 minutes, upload each part with a PUT to the
urlthat has the samepartNumber, and keep theETagheader of each response. - Call Complete Upload with every
partNumberandeTag.
Example
curl -X POST 'https://api.youvico.com/api/projects/bdbff5de-96d7-468f-9db0-85fe28bd6b62/generation-attachments/upload.multipart' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "name": "reference.png", "size": 2400000 }'
{
"data": {
"id": "GA1234567890ABCD",
"parts": [
{
"partNumber": 1,
"url": "https://files.youvico.com/upload/eyJhbGciOiJFZERTQSIsImtpZCI6..."
}
]
}
}
Request
curl -X POST 'https://api.youvico.com/api/projects/bdbff5de-96d7-468f-9db0-85fe28bd6b62/generation-attachments/upload.multipart' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "reference.png",
"size": 2400000
}'
Response201 Created
{
"data": {
"id": "GA1234567890ABCD",
"parts": [
{
"partNumber": 1,
"url": "https://files.youvico.com/upload/eyJhbGciOiJFZERTQSIsImtpZCI6..."
}
]
}
}
Request
Path
idstringrequiredProject ID
Body
namestringrequired1-255 characters
Attachment file name
Example: reference.png
sizenumberrequiredInteger, 1-1000000000
Attachment size in bytes
Example: 2400000
Response
Returns 201 Created.
dataobjectUpload session
data.idstringCreated generation attachment ID
Example: GA1234567890ABCD
data.partsarrayUpload parts