{
 "documentation_revision": 10,
 "api_revision": 58,
 "source": "Endpoints.all + Learn.endpoints + McpTools",
 "operation": {
  "summary": "Take a photo now",
  "method": "POST",
  "auth": true,
  "mcp_tool": "camera_snapshot",
  "query": [],
  "developer_only": false,
  "capture": true,
  "body": [
   {
    "name": "camera",
    "description": "rear (default) or front",
    "type": "string",
    "required": false,
    "enum": [
     "rear",
     "front"
    ]
   },
   {
    "name": "flash",
    "description": "Fire the flash (default false)",
    "type": "boolean",
    "required": false
   },
   {
    "name": "zoom",
    "description": "Zoom ratio, e.g. 0.5 (ultra-wide), 1, 2, 5 (telephoto); the range is in /v1/capabilities after the first photo",
    "type": "number",
    "required": false
   },
   {
    "name": "max_width_px",
    "description": "Width limit, 64-20000, or null for full size (default 2048 unless size is given)",
    "type": "integer",
    "required": false
   },
   {
    "name": "store",
    "description": "Keep this capture too: any of memory (fetch it later from GET /v1/captures/{id}), files (a copy in the phone's Downloads/Bridgit), upload (POSTed to your upload_url). [] or \"none\" = only return it. Default: your POST /v1/captures/storage choice, else only returned",
    "type": "array",
    "required": false
   },
   {
    "name": "size",
    "description": "Preset: agent (1568 px, q85), thumb (512, q75), large (2560, q90), original",
    "type": "string",
    "required": false,
    "enum": [
     "agent",
     "thumb",
     "large",
     "original"
    ]
   },
   {
    "name": "max_edge_px",
    "description": "Long edge limit, 64-20000; overrides the preset",
    "type": "integer",
    "required": false
   },
   {
    "name": "quality",
    "description": "JPEG quality 40-100",
    "type": "integer",
    "required": false
   },
   {
    "name": "raw",
    "description": "1 = return the image bytes, details in X-Bridgit-* headers",
    "type": "integer",
    "required": false
   }
  ],
  "example": "POST /v1/camera/snapshot {\"camera\":\"rear\",\"zoom\":2}",
  "idempotent": true,
  "path": "/v1/camera/snapshot",
  "capability": "camera",
  "returns": "captured_at, width_px, height_px, format, size_bytes, data_base64 (or JPEG bytes with raw=1); capture {capture_id, stored, url, memory_until, file} when kept (X-Bridgit-Capture-Id with raw=1)",
  "mcp_input_schema": {
   "type": "object",
   "properties": {
    "max_width_px": {
     "description": "Width limit, 64-20000, or null for full size (default 2048 unless size is given)",
     "type": "integer"
    },
    "max_edge_px": {
     "description": "Long edge limit, 64-20000; overrides the preset",
     "type": "integer"
    },
    "size": {
     "description": "Preset: agent (1568 px, q85), thumb (512, q75), large (2560, q90), original",
     "type": "string",
     "enum": [
      "agent",
      "thumb",
      "large",
      "original"
     ]
    },
    "idempotency_key": {
     "description": "Any UUID; repeating the call with the same key within 24 h returns the first result instead of acting twice",
     "type": "string"
    },
    "zoom": {
     "description": "Zoom ratio, e.g. 0.5 (ultra-wide), 1, 2, 5 (telephoto); the range is in /v1/capabilities after the first photo",
     "type": "number"
    },
    "store": {
     "description": "Keep this capture too: any of memory (fetch it later from GET /v1/captures/{id}), files (a copy in the phone's Downloads/Bridgit), upload (POSTed to your upload_url). [] or \"none\" = only return it. Default: your POST /v1/captures/storage choice, else only returned",
     "type": "array",
     "items": {"type": "string"}
    },
    "camera": {
     "description": "rear (default) or front",
     "type": "string",
     "enum": [
      "rear",
      "front"
     ]
    },
    "flash": {
     "description": "Fire the flash (default false)",
     "type": "boolean"
    },
    "quality": {
     "description": "JPEG quality 40-100",
     "type": "integer"
    }
   },
   "required": []
  },
  "errors": [
   "capability_disabled",
   "permission_denied",
   "notifications_required",
   "device_locked",
   "sensor_busy",
   "capture_timeout",
   "service_start_blocked",
   "payload_too_large"
  ],
  "requires": null
 }
}
