Skip to main content
Five API takes input files as URLs. There is no upload endpoint: host the file somewhere public, for example in your own object storage, and pass its HTTPS URL in the request.

URL policy

Five API checks every input URL when you create the task, before any credit is held. A URL that breaks a rule answers 400 url_not_allowed with the field in param.
  • HTTPS only. http:// URLs are rejected.
  • Public host. The host name must resolve, through public DNS, to a public IP address. Private, loopback, link-local, carrier-grade NAT, cloud metadata and other reserved ranges are rejected.
  • Answers HEAD. Five API sends a HEAD request to the URL. It must answer 2xx, after at most 3 redirects; each redirect target is checked again.
  • Within the size limit. The Content-Length must not exceed the limit of the model (see below).
The same host rules apply to webhook_url.
Presigned URLs from S3, Google Cloud Storage, Azure Blob Storage, Cloudflare R2 and similar services work well. Keep them valid for at least an hour: a task downloads its input files after it is created, while it is queued.

Limits per model

GET /v1/models/{brand}/{version}/{task} returns each model’s limits in input_schema, including x-max-input-bytes, the largest accepted file.

When an input fails later

The URL check at creation can’t see everything inside a file. If a file turns out to be unusable during processing, the task fails and its credits are released:
  • input_fetch_failed (retryable): the file could not be downloaded or processed, for example because a presigned URL expired.
  • input_invalid (not retryable): the file was downloaded but its format, dimensions or length do not fit the model.

Troubleshooting url_not_allowed