### Install JavaScript/TypeScript SDK Source: https://yourimageshare.com/about/api Command to install the zero-dependency JavaScript/TypeScript client library. ```bash npm install yourimageshare ``` -------------------------------- ### Install Python SDK Source: https://yourimageshare.com/about/api Command to install the Python client library, which requires Python 3.8+ and the requests package. ```bash pip install yourimageshare ``` -------------------------------- ### Configure Flameshot for Linux Source: https://yourimageshare.com/about/api Setup instructions for the Flameshot upload script, including setting permissions and the API key environment variable. ```bash # One-time setup chmod +x yis-flameshot-upload.sh export YIS_API_KEY="YOUR_API_KEY" # or add to ~/.config/yourimageshare/api_key # Then bind this to a hotkey instead of calling flameshot directly: /path/to/yis-flameshot-upload.sh ``` -------------------------------- ### Run MCP Server Source: https://yourimageshare.com/about/api Command to execute the MCP server directly for AI agent integration without a formal installation step. ```bash npx yourimageshare-mcp ``` -------------------------------- ### Configure Greenshot for Windows Source: https://yourimageshare.com/about/api Setup instructions for the Greenshot PowerShell script, including setting the persistent environment variable and configuring the external command destination. ```powershell # One-time setup setx YIS_API_KEY "YOUR_API_KEY" # In Greenshot: Preferences > Destinations > External command > Settings # Command: powershell.exe # Arguments: -ExecutionPolicy Bypass -File "C:\path\to\yis-greenshot-upload.ps1" "%1" ``` -------------------------------- ### GET /api Source: https://yourimageshare.com/about/api Retrieves a list of uploaded files, supporting pagination. ```APIDOC ## GET /api ### Description Lists the files uploaded by the user. ### Method GET ### Endpoint https://yourimageshare.com/api ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **page** (integer) - Optional - The page number for pagination ``` -------------------------------- ### GET /api Source: https://yourimageshare.com/about/api Returns a paginated list of the authenticated account's uploads, sorted by newest first. ```APIDOC ## GET /api ### Description Returns a paginated list of the authenticated account's uploads, with 50 items per page. ### Method GET ### Endpoint https://yourimageshare.com/api ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number, defaults to 1. ### Response #### Success Response (200) - **type** (string) - Status type. - **data** (array) - List of upload objects. - **meta** (object) - Pagination metadata including current_page, last_page, and total. ``` -------------------------------- ### Interact with API using Python requests Source: https://yourimageshare.com/about/api Standard implementation for file operations using the requests library. Ensure the library is installed in your environment. ```python import requests API_KEY ="YOUR_API_KEY" BASE ="https://yourimageshare.com/api" # Upload a file with open("/path/to/photo.jpg", "rb") as f: res = requests.post(BASE, params={"key": API_KEY}, files={"uploads": f}) res.raise_for_status() upload = res.json()["data"] # List uploads res = requests.get(BASE, params={"key": API_KEY, "page": 1}) uploads = res.json() # Delete an upload res = requests.delete(f"{BASE}/{upload['id']}", params={"key": API_KEY}) ``` -------------------------------- ### List Uploads Response Source: https://yourimageshare.com/about/api Paginated response structure for listing account uploads via GET /api. ```json { "type": "success", "data": [ { "id": "aB3xY9qRz1", "type": "image", "title": null, "path": "https://i.yourimageshare.com/aB3xY9qRz1.webp", "src": "https://yourimageshare.com/ib/aB3xY9qRz1.webp", "direct": "https://yourimageshare.com/ib/aB3xY9qRz1", "expires_at": null, "created_at": "2026-07-23T15:43:28+01:00" }], "meta": { "current_page": 1, "last_page": 1, "total": 1 }} ``` -------------------------------- ### Upload files with Go net/http Source: https://yourimageshare.com/about/api Demonstrates multipart form data construction for file uploads. Requires standard library imports. ```go package main import ( "bytes" "encoding/json" "io" "mime/multipart" "net/http" "os" ) const apiKey ="YOUR_API_KEY" const base ="https://yourimageshare.com/api" func uploadFile(path string) (map[string]any, error) { file, err := os.Open(path) if err != nil { return nil, err }defer file.Close() body := &bytes.Buffer{}writer := multipart.NewWriter(body) part, _ := writer.CreateFormFile("uploads", path) io.Copy(part, file) writer.Close() req, _ := http.NewRequest("POST", base+"?key="+apiKey, body) req.Header.Set("Content-Type", writer.FormDataContentType()) res, err := http.DefaultClient.Do(req) if err != nil { return nil, err }defer res.Body.Close() var result map[string]any json.NewDecoder(res.Body).Decode(&result) return result, nil } ``` -------------------------------- ### Authenticate API Requests Source: https://yourimageshare.com/about/api Provide the API key using either a query parameter or an HTTP header. The query parameter takes precedence if both are provided. ```text ?key=YOUR_API_KEY ``` ```text X-API-Key: YOUR_API_KEY ``` -------------------------------- ### Perform API operations with curl Source: https://yourimageshare.com/about/api Use these commands to interact with the API via the command line. Ensure your API key is included in the query parameters. ```bash # Upload a file curl "https://yourimageshare.com/api?key=YOUR_API_KEY" \ -F "uploads=@/path/to/photo.jpg" # Upload a file that auto-deletes after 1 hour curl "https://yourimageshare.com/api?key=YOUR_API_KEY" \ -F "uploads=@/path/to/photo.jpg" \ -F "expires_in=3600" # List uploads curl "https://yourimageshare.com/api?key=YOUR_API_KEY" # Delete an upload curl -X DELETE "https://yourimageshare.com/api/aB3xY9qRz1?key=YOUR_API_KEY" ``` -------------------------------- ### POST /api Source: https://yourimageshare.com/about/api Uploads a single file for the authenticated account. Supports images and videos with optional expiration. ```APIDOC ## POST /api ### Description Uploads a single file for the authenticated account. This endpoint does not support batch uploads. ### Method POST ### Endpoint https://yourimageshare.com/api ### Parameters #### Request Body - **uploads** (file) - Required - The file to upload. - **expires_in** (integer) - Optional - Auto-delete this upload after this many seconds (60 to 2,592,000). ### Response #### Success Response (200) - **type** (string) - Status type. - **msg** (string) - Status message. - **data** (object) - Object containing file details including id, type, path, src, direct, and expires_at. ``` -------------------------------- ### Manage uploads with JavaScript fetch Source: https://yourimageshare.com/about/api Asynchronous functions for handling file uploads, listing, and deletions. Requires a browser or Node.js environment with fetch support. ```javascript const API_KEY ='YOUR_API_KEY'; const BASE ='https://yourimageshare.com/api'; async function uploadFile(file) { const form = new FormData(); form.append('uploads', file); const res = await fetch(`${BASE}?key=${API_KEY}`, { method: 'POST', body: form, }); const json = await res.json(); if (json.type !=='success') throw new Error(json.errors); return json.data; }async function listUploads(page = 1) { const res = await fetch(`${BASE}?key=${API_KEY}&page=${page}`); return res.json(); }async function deleteUpload(id) { const res = await fetch(`${BASE}/${id}?key=${API_KEY}`, { method: 'DELETE' }); return res.json(); } ``` -------------------------------- ### POST /api Source: https://yourimageshare.com/about/api Uploads a new image file to the service. Optionally supports setting an expiration time for the upload. ```APIDOC ## POST /api ### Description Uploads a file to the service. You can optionally specify an expiration time in seconds. ### Method POST ### Endpoint https://yourimageshare.com/api ### Parameters #### Query Parameters - **key** (string) - Required - Your API key #### Request Body - **uploads** (file) - Required - The image file to upload - **expires_in** (integer) - Optional - Time in seconds until the file auto-deletes ``` -------------------------------- ### Handle API requests with PHP curl Source: https://yourimageshare.com/about/api Implementation using PHP's native curl extension. Requires CURLFile for file uploads. ```php true, CURLOPT_POSTFIELDS => ['uploads' => new CURLFile('/path/to/photo.jpg')], CURLOPT_RETURNTRANSFER => true, ]); $upload = json_decode(curl_exec($curl), true)['data']; curl_close($curl); // List uploads $curl = curl_init("$base?key=$apiKey&page=1"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $uploads = json_decode(curl_exec($curl), true); curl_close($curl); ``` -------------------------------- ### View Rate Limit Headers Source: https://yourimageshare.com/about/api Standard headers returned in every API response to indicate current usage status. ```http X-RateLimit-Limit: 20 X-RateLimit-Remaining: 14 ``` -------------------------------- ### Upload File Response Source: https://yourimageshare.com/about/api Successful response structure after uploading a file via POST /api. ```json { "type": "success", "msg": "success", "data": { "id": "aB3xY9qRz1", "type": "image", "path": "https://i.yourimageshare.com/aB3xY9qRz1.webp", "src": "https://yourimageshare.com/ib/aB3xY9qRz1.webp", "direct": "https://yourimageshare.com/ib/aB3xY9qRz1", "expires_at": null }} ``` -------------------------------- ### Standard Error Response Format Source: https://yourimageshare.com/about/api The consistent JSON structure returned for all API error conditions. ```json { "type": "error", "errors": "A human-readable description of what went wrong." } ``` -------------------------------- ### Delete Upload Response Source: https://yourimageshare.com/about/api Confirmation response after successfully deleting an upload via DELETE /api/{id}. ```json { "type": "success", "msg": "Deleted." } ``` -------------------------------- ### DELETE /api/{id} Source: https://yourimageshare.com/about/api Permanently deletes one of the authenticated account's uploads. ```APIDOC ## DELETE /api/{id} ### Description Permanently deletes one of the authenticated account's uploads. This action cannot be undone. ### Method DELETE ### Endpoint https://yourimageshare.com/api/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the file to delete. ### Response #### Success Response (200) - **type** (string) - Status type. - **msg** (string) - Confirmation message. ``` -------------------------------- ### DELETE /api/{id} Source: https://yourimageshare.com/about/api Deletes a specific file upload by its unique identifier. ```APIDOC ## DELETE /api/{id} ### Description Deletes an existing upload using its ID. ### Method DELETE ### Endpoint https://yourimageshare.com/api/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the upload #### Query Parameters - **key** (string) - Required - Your API key ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.