Skip to content

Get Download URL for Generated Files ​

This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.

Endpoint ​

POST /common/download-url

Full URL: https://ai.modelfold.online/v1/common/download-url

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Get Download Link for Generated Files ​

TIP

Convert generated file URLs into downloadable temporary links. Only supports files generated by ai.modelfold.online services.

Features ​

  • Convert ai.modelfold.online generated file URLs into downloadable links
  • Accepts file URLs from task results (such as resultUrls or audio_url). URLs from the File Upload API are not supported.
  • Temporary download links are valid for 20 minutes
  • Secure access to generated content
  • Protected by API Key authentication

Important Notes ​

WARNING

Accepts file URLs from task results (such as resultUrls or audio_url). URLs from the File Upload API are not supported.

TIP

Downloadable links expire after 20 minutes. Please ensure you download or cache content within this timeframe.

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
urlstringYesFile URL from a task result (e.g. resultUrls[0]). Images, videos and audio are supported.

Request Example ​

bash
curl -X POST "https://ai.modelfold.online/v1/common/download-url" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://tempfile.aiquickdraw.com/path/to/image.jpg"
}'
json
{
  "url": "https://tempfile.aiquickdraw.com/path/to/image.jpg"
}

Response ​

200 — Request successful ​

参数类型必填说明
codeinteger否Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值:200 / 401 / 402 / 404 / 422 / 429 / 455 / 500 / 505。 示例:200。
msgstring否Error message when code != 200 示例:success。
datastring否Downloadable URL for the file. Valid for 20 minutes. 示例:https://tempfile.1f6cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbd98。
json
{
  "code": 200,
  "msg": "success",
  "data": "https://tempfile.1f6cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbd98"
}

500 — Server error. ​

参数类型必填说明
codeinteger是Response status code
- 200: Success - Request has been processed successfully
- 401: Unauthorized - Authentication credentials are missing or invalid
- 402: Insufficient Credits - Account does not have enough credits to perform the operation
- 404: Not Found - The requested resource or endpoint does not exist
- 408: Timeout - No result has been returned for over 10 minutes.
- 422: Validation Error - The request parameters failed validation checks
- 429: Rate Limited - Request limit has been exceeded for this resource
- 455: Service Unavailable - System is currently undergoing maintenance
- 500: Server Error - An unexpected error occurred while processing the request
- 501: Generation Failed - Content generation task failed
- 505: Feature Disabled - The requested feature is currently disabled
msgstring是Response message, error description when failed
dataobject是—
json
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}

ModelFold — one API for all the best AI models.