{
 "openapi": "3.0.3",
 "info": {
  "title": "Captions and prompt extraction (default): JoyCaption Beta One",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space Upsampler/joy-caption; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://upsampler-joy-caption.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Image utilities and perception",
  "slot": "Captions and prompt extraction",
  "need": "Describe an image, or reverse-engineer a prompt to regenerate a look.",
  "role": "default",
  "space": "Upsampler/joy-caption",
  "space_url": "https://huggingface.co/spaces/Upsampler/joy-caption",
  "model": "JoyCaption Beta One",
  "license": "Llama 3.1 Community",
  "license_class": "cond",
  "gpu_seconds_booked": "18",
  "notes": "The best open captioner for generation prompts, and this copy books only 18 s.",
  "caveats": "",
  "lineup_call": "/chat_joycaption(input_image, prompt, temperature=0.6, top_p=0.9, max_new_tokens=512, log_prompt=false) \u2192 text",
  "api_style": "v1",
  "mcp_url": "https://upsampler-joy-caption.hf.space/gradio_api/mcp/"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/chat_joycaption": {
   "post": {
    "description": "Describe an image, or reverse-engineer a prompt to regenerate a look. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/chat_joycaption/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/Upsampler/joy-caption. License: Llama 3.1 Community. \n\nUpstream description: \nReturns, in order: Caption: str",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 1,
          "maxItems": 6,
          "items": {},
          "description": "Positional inputs, in this order:\n0. input_image: dict(path: str | None (Path to a local file), url: str | None (Publicly available url or base64 encoded image), size: int | None (Size of image in bytes), orig_name: str | None (Original filename), mime_type: str | None (mime type of image), is_stream: bool (Can always be set to False), meta: dict(str, Any)) (required)\n1. prompt: str (default \"Write a long detailed description for this image.\")\n2. temperature: float (default 0.6)\n3. top_p: float (default 0.9)\n4. max_new_tokens: float (default 512)\n5. log_prompt: bool (default false)"
         }
        }
       }
      }
     }
    },
    "x-gradio-parameters": [
     {
      "name": "input_image",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": true,
      "default": null
     },
     {
      "name": "prompt",
      "schema": {
       "type": "string"
      },
      "required": false,
      "default": "Write a long detailed description for this image."
     },
     {
      "name": "temperature",
      "schema": {
       "type": "number",
       "description": "numeric value between 0.0 and 2.0"
      },
      "required": false,
      "default": 0.6
     },
     {
      "name": "top_p",
      "schema": {
       "type": "number",
       "description": "numeric value between 0.0 and 1.0"
      },
      "required": false,
      "default": 0.9
     },
     {
      "name": "max_new_tokens",
      "schema": {
       "type": "number",
       "description": "numeric value between 1 and 2048"
      },
      "required": false,
      "default": 512
     },
     {
      "name": "log_prompt",
      "schema": {
       "type": "boolean"
      },
      "required": false,
      "default": false
     }
    ],
    "operationId": "image_utils_captions_and_prompt_extraction",
    "tags": [
     "Image utilities and perception"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Captions and prompt extraction (default): JoyCaption Beta One",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/chat_joycaption/{event_id}": {
   "get": {
    "summary": "Read the result stream for /chat_joycaption",
    "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "operationId": "image_utils_captions_and_prompt_extraction_result",
    "tags": [
     "Image utilities and perception"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}