DOCUMENTATION & PROTOCOL SPECIFICATION

PixelMesh Developer & Agent API

Everything you need to connect Claude Desktop, Cursor, Python scripts, and autonomous LLM agents to the high-performance Sharp image mesh using asymmetric cryptographic authentication.

Authentication Protocol

SSH-Style Cryptographic Request Signing (ADR 0001)

PixelMesh completely eliminates shared static API keys. Agents sign each request payload using their private key. The gateway verifies the signature against the registered public key matching the fingerprint header.

Required HeaderDescriptionExample
X-Agent-Key-FingerprintBase64URL SHA-256 hash of public keySHA256:47DEQpj8...
X-Agent-TimestampUnix epoch timestamp in seconds (±60s window)1740001234
X-Agent-NonceUnique UUID/hex string to prevent replay attacks9b1deb4d-3b7d-...
X-Agent-SignatureBase64 signature of the canonical stringk8Z7d9...==
Canonical Signature String Structure:
METHOD + "\n" + PATH + "\n" + TIMESTAMP + "\n" + NONCE + "\n" + SHA256_HEX(REQUEST_BODY)
Autonomous Onboarding

Autonomous Machine Registration (`POST /api/auth/register`)

Agents can onboard themselves without human intervention by generating an Ed25519 keypair and submitting a signed challenge to receive 100 free instant credits.

curl -X POST http://localhost:3000/api/auth/register \
  -H "Content-Type: application/json" \
  -H "X-Agent-Key-Fingerprint: SHA256:your_fingerprint" \
  -H "X-Agent-Timestamp: 1740001234" \
  -H "X-Agent-Nonce: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
  -H "X-Agent-Signature: your_base64_signature" \
  -d '{
    "name": "Autonomous-Agent-1",
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA...\n-----END PUBLIC KEY-----",
    "algorithm": "ed25519",
    "timestamp": 1740001234
  }'
Tool Catalog Reference

22+ Native Image Processing Tools

crop_image1 Credit

Extracts an exact rectangular sub-region by coordinate bounding box.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • left(number):Left X start coordinate in pixels
  • top(number):Top Y start coordinate in pixels
  • width(number):Width of extracted crop in pixels
  • height(number):Height of extracted crop in pixels
circle_crop1 Credit

Masks the image into a circular/elliptical crop with alpha transparency or custom background fill.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • radius(number):Circle radius (defaults to half of min dimension)
  • centerX(number):Center X pixel coordinate
  • centerY(number):Center Y pixel coordinate
  • background(string):Hex/CSS background color for out-of-circle areas
rotate_image1 Credit

Rotates the image by an exact angle with automatic canvas dimension calculation.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • angle(number):Angle in degrees (e.g. 90, 180, 270, 45)
  • background(string):Color for newly exposed corners
flip_image1 Credit

Mirrors the image along the horizontal and/or vertical axes.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • horizontal(boolean):Flip along vertical axis (mirror horizontally)
  • vertical(boolean):Flip along horizontal axis (mirror vertically)
straighten_image1 Credit

Applies fine-tuned perspective straightening (-45° to +45°) with optional auto-zoom crop to eliminate black edges.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • angle(number):Angle in degrees between -45 and 45
  • cropToFit(boolean):Crop inwards to remove exposed boundary triangles
adjust_brightness1 Credit

Scales linear image luminance by a multiplicative factor.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • factor(number):Luminance multiplier (0.0 to 3.0, 1.0 is neutral)
adjust_contrast1 Credit

Expands or compresses the dynamic range around the midtone luminance curve.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • factor(number):Contrast multiplier (0.0 to 3.0)
adjust_gamma1 Credit

Applies non-linear gamma exponent correction to restore shadow and highlight detail.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • gamma(number):Gamma exponent (0.1 to 3.0, default 1.0)
make_sepia_tone1 Credit

Transforms the image into a warm vintage sepia photograph using a calibrated 3x3 color recombination matrix.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • intensity(number):Sepia blending intensity (0.0 to 1.0, default 1.0)
make_grayscale1 Credit

Converts the image to single-channel luminance with standard or perceptual Rec.709 weights.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • mode(string):'standard' or 'weighted' (default: standard)
glow_effect1 Credit

Synthesizes an ethereal luminous bloom via multi-pass Gaussian blur and screen/add blending.

Arguments:
  • image(string (data URI)):Base64 data URI image source
  • intensity(number):Bloom intensity factor (0.0 to 2.0, default 0.8)
  • radius(number):Blur radius in pixels (1 to 50, default 10)
batch_filter_pipeline3 Credits

Chains multiple image manipulation steps sequentially into an atomic DAG pipeline in a single round-trip.

Arguments:
  • image(string (data URI)):Initial base64 image input
  • pipeline(array of objects):Ordered array of { tool, params } definitions
get_image_metadata1 Credit

Extracts dimension dimensions (width, height), color space, alpha channels, format, and density without altering pixels.

Arguments:
  • image(string (data URI)):Base64 data URI image to analyze