Skip to content

Instantly share code, notes, and snippets.

@yogesh4243
Forked from PramodDutta/APIDocsSwagger.yaml
Created November 29, 2025 06:44
Show Gist options
  • Select an option

  • Save yogesh4243/9d0140fecf506f94e91a7c0c76ed6788 to your computer and use it in GitHub Desktop.

Select an option

Save yogesh4243/9d0140fecf506f94e91a7c0c76ed6788 to your computer and use it in GitHub Desktop.
openapi: 3.0.3
info:
title: Imgur Image Upload API
description: API for uploading images to Imgur using Client-ID authentication.
version: 1.0.0
servers:
- url: https://api.imgur.com/3
paths:
/image:
post:
summary: Upload an image to Imgur
description: >
Uploads an image file or base64/URL content to Imgur using multipart/form-data.
Requires a valid Imgur Client-ID via the Authorization header.
tags:
- Image Upload
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
description: The image file to upload.
type:
type: string
example: image
description: |
The type of the image.
Options: `file`, `base64`, `url`, `image`.
title:
type: string
example: Simple upload
description: Optional image title.
description:
type: string
example: This is a simple image upload in Imgur.
description: Optional image description.
required:
- image
parameters: []
responses:
'200':
description: Image uploaded successfully
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: string
example: abc123
title:
type: string
example: Simple upload
description:
type: string
example: This is a simple image upload in Imgur.
type:
type: string
example: image/jpeg
link:
type: string
example: https://i.imgur.com/abc123.jpeg
success:
type: boolean
example: true
status:
type: integer
example: 200
'400':
description: Bad request (invalid image or payload)
'401':
description: Unauthorized — invalid or missing Client-ID
'500':
description: Internal server error
security:
- ClientIDAuth: []
components:
securitySchemes:
ClientIDAuth:
type: apiKey
in: header
name: Authorization
description: >
Use the format:
`Authorization: Client-ID YOUR_CLIENT_ID`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment