{
  "name": "imghost",
  "description": "Kendi barındırdığımız dosya/görsel paylaşım sunucusu - AI agent'lar için upload API",
  "base_url": "https://imghost.duckdns.org",
  "local_url": "http://localhost:3456",
  "auth": {
    "header": "x-upload-code",
    "value": null,
    "note": "Kod public dosyada yazmaz. Local agent: env UPLOAD_CODE veya /home/mert/imghost/server.js'den oku. Uzak agent: kullanıcıdan iste."
  },
  "endpoints": {
    "file_upload": {
      "method": "PUT",
      "path": "/f/upload?name=FILENAME",
      "full_url_local": "http://localhost:3456/f/upload?name=FILENAME",
      "full_url_public": "https://imghost.duckdns.org/f/upload?name=FILENAME",
      "headers": {
        "x-upload-code": "$UPLOAD_CODE",
        "Content-Type": "application/octet-stream"
      },
      "body": "raw binary (--data-binary @/path/to/file)",
      "limit": "500MB",
      "response": {
        "url": "https://imghost.duckdns.org/{id}",
        "url_long": "https://imghost.duckdns.org/f/{id}/{filename}",
        "path": "/home/mert/tmp/files/{id}/{filename}",
        "filename": "dosya.zip",
        "size": 12345
      },
      "example_curl": "curl -s -X PUT \"http://localhost:3456/f/upload?name=dosya.zip\" -H \"x-upload-code: $UPLOAD_CODE\" --data-binary @\"/tam/yol/dosya.zip\"",
      "download": "GET /{id} (kisa, onerilen) veya GET /f/:id/:filename — auth yok, public link"
    },
    "image_upload": {
      "method": "POST",
      "path": "/upload",
      "full_url_local": "http://localhost:3456/upload",
      "full_url_public": "https://imghost.duckdns.org/upload",
      "headers": {
        "x-upload-code": "$UPLOAD_CODE",
        "Content-Type": "application/json"
      },
      "body": "{\"image\":\"data:image/png;base64,iVBORw0...\"}",
      "limit": "12MB",
      "response": {
        "id": "k7m",
        "url": "https://imghost.duckdns.org/{id}",
        "url_long": "https://imghost.duckdns.org/i/{id}.png",
        "path": "/home/mert/tmp/images/{id}.png",
        "filename": "{id}.png"
      },
      "example_curl": "curl -s -X POST \"http://localhost:3456/upload\" -H \"x-upload-code: $UPLOAD_CODE\" -H \"Content-Type: application/json\" -d '{\"image\":\"data:image/png;base64,iVBOR...\"}'",
      "note": "Sadece data:image/*;base64 formatı. Büyük görseller için /f/upload kullan"
    }
  },
  "docs": {
    "human_ui": "/ ve /f",
    "llms_txt": "https://imghost.duckdns.org/llms.txt",
    "agent_json": "https://imghost.duckdns.org/agent.json"
  },
  "tips": [
    "Kullaniciya her zaman kisa `url` alanini ver; `url_long` sadece geriye donuk uyumluluk icin",
    "Aynı makinedeysen local_url kullan (hızlı ve güvenilir)",
    "Uzaktan agent isen base_url (https) kullan",
    "Kodu asla tahmin etme, kullanıcıdan iste veya local env'den oku",
    "Klasör yüklemeden önce zip -r ile paketle",
    "Gizli anahtar taraması yapmadan yükleme"
  ],
  "short_links": {
    "format": "https://imghost.duckdns.org/{id}",
    "id": "3 karakter, alfabe 23456789abcdefghjkmnpqrstuvwxyz (0/1/i/l/o yok)",
    "note": "Gorsel ve dosya ayni kok adres uzayini paylasir; tip sunucuda cozulur. Eski uzun linkler (/i/... ve /f/.../...) calismaya devam eder."
  }
}