Visual AI API for hair try-on and image editing
GLOBALSNAP AI LTD · Co. no. 17083984
API Reference

Global Snap API

Add hair try-on, beard styling, makeup previews, and image-editing transformations to your product with one asynchronous API flow.

Base URL https://api.globalsnap.example Placeholder URL. Production endpoints are shared with approved partners.

How the API works

Global Snap uses a job-based workflow. Your app sends an image and a transformation request. We return a job ID immediately. Your app can either poll the job endpoint or receive a webhook when the result is ready.

1Send image + transform
2Receive queued job
3Poll or wait for webhook
4Render final image
These docs show the public API contract only. Internal prompts, model settings, GPU routing, queue workers, and admin endpoints are intentionally hidden.

Authentication

Use a bearer token with every request.

Authorization: Bearer GLOBALSNAP_API_KEY
Content-Type: application/json
POST/v1/try-on

Create a visual transformation job

Create an asynchronous job for hair color, hairstyle, beard, makeup, or general image-editing flows.

Request body

ParameterTypeRequiredDescription
imagestringYesBase64 data URL. Hosted image URL support can be enabled for approved integrations.
transformstringYesThe transformation category, for example hair_color, beard, or image_edit.
stylestringYesA preset or desired result, for example warm_balayage.
webhookstringNoYour HTTPS endpoint for completion events.

Examples

cURL
curl https://api.globalsnap.example/v1/try-on \
  -H "Authorization: Bearer $GLOBALSNAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "data:image/jpeg;base64,...",
    "transform": "hair_color",
    "style": "warm_balayage",
    "webhook": "https://yourapp.com/webhooks/global-snap"
  }'
Python
import os
import requests

response = requests.post(
    "https://api.globalsnap.example/v1/try-on",
    headers={
        "Authorization": f"Bearer {os.environ['GLOBALSNAP_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "image": "data:image/jpeg;base64,...",
        "transform": "hair_color",
        "style": "warm_balayage",
        "webhook": "https://yourapp.com/webhooks/global-snap",
    },
)

job = response.json()
print(job["id"], job["status"])
JavaScript
const response = await fetch(
  "https://api.globalsnap.example/v1/try-on",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.GLOBALSNAP_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      image: "data:image/jpeg;base64,...",
      transform: "hair_color",
      style: "warm_balayage",
      webhook: "https://yourapp.com/webhooks/global-snap",
    }),
  }
);

const job = await response.json();

Response

{
  "id": "job_8f4b2c91",
  "status": "queued",
  "created_at": "2026-05-18T10:30:00Z"
}
GET/v1/jobs/{job_id}

Poll job status

Poll this endpoint until the status becomes completed or failed.

curl https://api.globalsnap.example/v1/jobs/job_8f4b2c91 \
  -H "Authorization: Bearer $GLOBALSNAP_API_KEY"

Completed response

{
  "id": "job_8f4b2c91",
  "status": "completed",
  "result": {
    "image": "https://cdn.globalsnap.example/results/job_8f4b2c91.jpg"
  },
  "created_at": "2026-05-18T10:30:00Z",
  "completed_at": "2026-05-18T10:30:08Z"
}

Webhooks

Add a webhook URL when creating a job. Global Snap sends a compact event when the transformation finishes.

{
  "event": "job.completed",
  "id": "job_8f4b2c91",
  "status": "completed",
  "result": {
    "image": "https://cdn.globalsnap.example/results/job_8f4b2c91.jpg"
  }
}

Transforms

TransformExample stylesUse case
hair_colorwarm_balayage, copper_red, ash_blondeHair color try-on and salon previews.
hairstylelong_layers, pixie_cut, curly_bobHaircut and style exploration.
beardlight_stubble, full_beard, clean_shaveMen's grooming flows.
makeupnatural_glow, glam_evening, soft_lipBeauty and cosmetics previews.
image_editeditorial, background_clean, product_sceneGeneral app-scale image editing.

Error responses

StatusCodeMeaning
400invalid_requestMissing field, invalid transform, or unsupported image format.
401unauthorizedMissing or invalid API key.
402quota_exceededPlan quota or billing limit reached.
422image_unprocessableThe image cannot be processed for the requested transformation.
503temporarily_unavailableThe queue is temporarily unavailable. Retry with backoff.