YourImageShare Replace API

The Replace API from YourImageShare, for replace.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 1

POST /{id}/replace Replace the file of an upload #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/yourimageshare-com:yourimageshare-com-replace-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

yourimageshare-com-replace-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: YourImageShare Replace API
  version: 1.0.0
  description: 'Free JSON/REST API for YourImageShare - upload, list, and delete image/video files. Every request needs an API key. Official client libraries: JavaScript/TypeScript (`yourimageshare` on npm), Python (`yourimageshare` on PyPI), an MCP server (`yourimageshare-mcp` on npm, also hosted at https://yourimageshare.com/mcp - streamable HTTP, uploads work there without an API key) for AI agents, and a Discord bot.'
  termsOfService: https://yourimageshare.com/about/terms-and-conditions
  contact:
    url: https://yourimageshare.com/contact
  license:
    name: MIT
    url: https://github.com/yourimageshare/yourimageshare/blob/main/LICENSE
servers:
- url: https://yourimageshare.com/api
  description: Production
security:
- ApiKeyHeader: []
- ApiKeyQuery: []
tags:
- name: Replace
paths:
  /{id}/replace:
    post:
      operationId: replaceUpload
      summary: Replace the file of an upload
      description: 'Swap the file behind one of your uploads (full API key). Any allowed type: image, GIF or video, even a different type than before. The id, page and links stay the same; the new file goes through the same checks and conversions as a new upload. The previous version is removed.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The upload id, from the `upload` or `list` response.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uploads:
                  type: string
                  format: binary
                  description: The new file (up to 200MB). Omit when sending upload_id.
                upload_id:
                  type: string
                  description: Id of a file sent in pieces with POST /api/chunk (for files over 100MB through Cloudflare).
                filename:
                  type: string
                  description: Original file name when using upload_id.
                keep_original:
                  type: boolean
                  description: Keep the image exactly as uploaded (JPG/PNG over 1 MB are otherwise optimized to WebP).
      responses:
        '200':
          description: The upload.
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - success
                  data:
                    $ref: '#/components/schemas/Upload'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No such upload on this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: No file, a file type that is not allowed, or a file refused by moderation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: 'Password-protected or view-limited upload: remove that first.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Replace
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          const: error
        errors:
          type: string
    Upload:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for this upload. Pass to the delete endpoint to remove it.
        type:
          type: string
          enum:
          - image
          - video
        path:
          type: string
          description: The storage URL of the file as uploaded. It can change shortly afterwards when the file is converted (WebP/MP4) - store src instead.
        src:
          type: string
          description: 'Permanent direct file URL: always opens the current file. Use it for <img>/<video> src and store it.'
        direct:
          type: string
          description: The shareable page URL (title, description, comments, share buttons).
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        thumb:
          type:
          - string
          - 'null'
          format: uri
          description: 'A 280px wide WebP thumbnail (a video: its first frame), or null.'
        width:
          type:
          - integer
          - 'null'
          description: Display width in pixels, or null if unknown.
        height:
          type:
          - integer
          - 'null'
          description: Display height in pixels, or null if unknown.
        thumbhash:
          type:
          - string
          - 'null'
          description: 'ThumbHash placeholder (base64, see github.com/evanw/thumbhash): decode it to show a blurred preview while the file loads. Null for audio and some older uploads.'
        size:
          type:
          - integer
          - 'null'
          description: File size in bytes as stored.
        locked:
          type: boolean
          description: True if the upload is password-protected.
        duplicate:
          type: boolean
          description: 'Upload response only: true if this account had already uploaded the exact same file and that upload was returned instead of a new one.'
        visibility:
          type: string
          enum:
          - private
          - unlisted
          - public
        title:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        delete_url:
          type: string
          format: uri
          description: 'Upload response only (new uploads, not duplicates): a private link that deletes the upload without an API key. Shown once.'
      required:
      - id
      - type
      - path
      - src
      - direct
      - expires_at
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key or upload-only key, from the API tab at https://yourimageshare.com/my-account. The full API key can upload, list, and delete. The upload-only key can only upload (list/delete return 401 for it) - use it anywhere the value ends up visible to others, and the full key only in trusted server-side code.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: key
      description: Fallback for the X-API-Key header (same key types accepted), kept for older integrations. If both are present, the header wins.
externalDocs:
  description: Full human-readable API reference
  url: https://yourimageshare.com/about/api