Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Upsampler Files API
version: '2'
description: 'Image and video upscaling, plus single-purpose image utilities. Jobs are asynchronous: submit, then poll /api/v2/status/{id} or receive a signed webhook.'
servers:
- url: https://upsampler.com
security:
- bearerAuth: []
tags:
- name: Files
paths:
/api/v2/uploads:
post:
summary: Get a URL to upload a file to
description: 'Returns a one-shot `uploadUrl` to PUT raw bytes to, and the `fileUrl` to then pass as `imageUrl` or `videoUrl` on a submission. The PUT must send `Content-Type` set to the returned `contentType`, which is signed into the URL. Use this rather than a base64 data URI for anything that is not small: base64 travels inside the request body, which is capped.'
tags:
- Files
operationId: createUpload
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- extension
- size
properties:
extension:
type: string
enum:
- jpg
- jpeg
- png
- webp
- mp4
- webm
- mov
description: The file's type. Only the key's shape is set from this; the format is verified from the bytes at submit.
size:
type: integer
minimum: 1
maximum: 4194304000
description: The file's exact length in bytes. Signed into the upload URL, so the PUT is refused if it sends any other number of bytes. Images are capped at 524288000 bytes, videos at 4194304000.
responses:
'200':
description: An upload URL and the URL to submit the file by.
content:
application/json:
schema:
type: object
properties:
uploadUrl:
type: string
contentType:
type: string
description: Send this as the Content-Type header on the PUT. The upload is refused otherwise.
fileUrl:
type: string
expiresIn:
type: integer
description: Seconds the uploadUrl stays valid for.
4XX:
description: Request refused.
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- FAILED
error: {}
code:
type: string
description: Stable machine-readable failure identifier.
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Your API key, as `Authorization: Bearer <key>`.'