---
name: givegigs-images
description: Vision analysis for vectorization, AI image upscaling, media asset uploads, and central AI quota tracking.
---

# Image Studio & Media Processing

Base URL: `https://givegigs.com`. Authenticate with `Authorization: Bearer givegigs-...` or `X-API-Key`. Private reads require `read` scope; mutations require `write` scope.

Web interface: `https://givegigs.com/tools/image`.

## Central AI Quota & microMoney (mM)

AI image analysis and upscaling consume central microMoney allowance (`1 microMoney = 1 mM = $0.000001 USD`). Non-admin users receive a default allowance of **1,000,000 mM/month ($1.00 USD/month)**. Freelancers can also draw from a client or business owner's sponsored microMoney pool via Cheap (10% fee) or Secure (25% fee with tamper-evident audit logging) options. Non-AI browser editing requires no microMoney.

```http
GET /api/ai/quota
Authorization: Bearer givegigs-...
```

### Response
```json
{
  "unit": "microMoney",
  "shortUnit": "mM",
  "monthlyLimitMicroMoney": 1000000,
  "monthlyRemainingMicroMoney": 989450,
  "creditsMicroMoney": 500000,
  "allowances": {
    "fiveHourRemainingUsd": "0.020",
    "dailyRemainingUsd": "0.100",
    "weeklyRemainingUsd": "0.250",
    "monthlyRemainingUsd": "0.989"
  },
  "resetsAt": {
    "fiveHour": "2026-10-29T20:00:00.000Z",
    "daily": "2026-10-30T00:00:00.000Z",
    "weekly": "2026-11-02T00:00:00.000Z",
    "monthly": "2026-11-01T00:00:00.000Z"
  },
  "providers": { "openai": true, "metamuse": false },
  "model": "gpt-6-luna",
  "reasoning": "low"
}
```

## Vision Analysis for Vectorization

Analyzes raster images to identify main geometric shapes, detail levels, and vectorization preservation guidelines:

```http
POST /api/tools/image/analyze
Content-Type: application/json
Authorization: Bearer givegigs-...

{
  "imageData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
```

Returns `{ "analysis": "1) Main shapes: circular badge with stylized eagle... 2) Detail: fine feathers require 4-color posterize... 3) Preserve outer border geometry." }`.

### Valley CMDR Image and File Input

Signed-in users can paste or attach up to eight PNG, JPEG, WebP, or GIF images (3 MB total), plus TXT, Markdown, CSV, JSON, or LOG files (20,000 combined characters). Text files are read locally. Nothing is sent until the user presses **Send**. Clear eBay, auction, resale, or bulk-lot wording routes straight to `/api/flippers/muse/lot-xray`. For image-only or ambiguous requests, `/api/tools/image/analyze` uses vision to classify the evidence; only a clearly depicted lot with routing confidence of at least 0.8 automatically continues to Lot X-Ray. Uncertain images remain visual context for Commander. The analyzed report, evidence, screenshots, costs, and detected cost evidence are handed to the existing Lot X-Ray workbench in the same tab. Lot X-Ray stores the current screenshots and report in that tab's session draft so the user can review and edit them; a prior saved lot draft is replaced only after separate confirmation. The request may use microMoney. No image is uploaded to the GiveGigs media library or a worker profile by this analysis. Other images return only text observations to Commander and are not retained there. PDFs and office documents are not currently supported as attachments.

### Explicit Portfolio Project Review

The signed-in Commander browser panel may send a user-selected local project image to the configured vision provider only after the user presses **Review selected project image**. A public worker portfolio card with a linked image also offers **Review project image with AI**; that request names a worker and project ID, and the server verifies the active worker, project relationship, and worker-owned GiveGigs storage path before analysis. Both use `purpose: "portfolio-review"` and return observations about visible craft, techniques, composition, legibility, and presentation, including uncertainty. For verified portfolio links, only text observations and the verified project link are offered to the editable Commander composer; the user must send them separately. Local images are not attached or published. Never assess a person's attractiveness or infer age, race, ethnicity, gender, disability, or other demographics. Do not claim who made the work, ownership, identity, or outcomes from an image.

## AI Image Upscaling

Enhance low-resolution photos using deep generative upscalers:

```http
POST /api/tools/image/upscale
Authorization: Bearer givegigs-...
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary

------WebKitFormBoundary
Content-Disposition: form-data; name="file"; filename="sample.png"
Content-Type: image/png

<binary data>
------WebKitFormBoundary
Content-Disposition: form-data; name="scale"

4
------WebKitFormBoundary
Content-Disposition: form-data; name="model"

real-esrgan
------WebKitFormBoundary
Content-Disposition: form-data; name="faceEnhance"

true
------WebKitFormBoundary--
```

- `scale`: `2`, `3`, or `4`.
- `model`: `real-esrgan` (general/products) | `codeformer` (portraits/faces).
- Returns `{ "imageUrl": "https://..." }`. Max file size: 20 MB.

## General File Upload

```http
POST /api/upload
Authorization: Bearer givegigs-...
Content-Type: multipart/form-data
```

Upload images (PNG, JPEG, WebP, GIF) or audio (MP3, WAV, OGG, WebM). Files are verified by magic byte headers and uploaded to the caller's private storage path. Returns `{ "url": "https://epgrmqfhvkuxopzlppgz.supabase.co/..." }`.

[Light Skill](https://givegigs.com/skill.md) · [Complete Reference](https://givegigs.com/skill-heavy.md)
