Skip to main content

Check an image you found online

When your service finds an image on the web, such as in a moderation queue or a crawl, look it up to learn whether it carries a SASHA Signature and whether its owner allows it where you found it. Send the page along with the image: without it, SASHA cannot say whether a restricted image belongs there.

Before you start​

  • A Client ID and Client Secret, from Get access.
  • For gRPC, the client code generated in Step 1 of the quickstart.
  • The address of the image, and the address of the page that shows it. SASHA fetches the image itself, so its URL must be HTTPS, public, and answer without a redirect.

Step 1: Submit the lookup​

Send three URLs:

media_urlThe address SASHA downloads the image from
publish_urlThe page that shows the image, as a reader sees it in the browser
source_urlThe address the image bytes are served from, often the same as media_url

Replace <access-token> with a token from POST /oauth/token:

Request
curl https://partner.api.sasha.eu/signature/lookup \
-H "Authorization: Bearer <access-token>" \
-H "Content-Type: application/json" \
-d '{
"media_url": "https://cdn.example.com/images/abc.jpg",
"media_mime_type": "image/jpeg",
"publish_url": "https://news.example.com/articles/123",
"source_url": "https://cdn.example.com/images/abc.jpg"
}'
Response
{
"job": {
"job_id": "3f9d2a61-5b7c-4e8d-9a0b-1c2d3e4f5a6b",
"type": "lookup-signature",
"status": "pending",
"created_at": "2026-10-16T10:00:00Z",
"updated_at": "2026-10-16T10:00:00Z"
}
}

A 400 means SASHA could not fetch media_url, or the request is not valid, and no job was created. A failed fetch is worth one retry; an invalid request is not.

Step 2: Read the result​

Read the job until status is completed or failed, or send a callback_url with the lookup and let SASHA post it to you, as Set up callback notifications shows. Replace <job-id> with the job_id from Step 1:

Request
curl https://partner.api.sasha.eu/jobs/<job-id> \
-H "Authorization: Bearer <access-token>"
Response
{
"job_id": "3f9d2a61-5b7c-4e8d-9a0b-1c2d3e4f5a6b",
"type": "lookup-signature",
"status": "completed",
"signature_id": "12345678901234567890",
"creator_id": 123,
"guidance": {
"share_state": "restricted",
"advice": "not_allowed"
},
"created_at": "2026-10-16T10:00:00Z",
"updated_at": "2026-10-16T10:00:03Z"
}

A completed lookup is in one of three states:

signature_id is nullThe image carries no SASHA Signature.
signature_id and creator_id, no guidanceThe image carries a Signature, and SASHA has revoked it or could not evaluate its Record. A Record that could not be evaluated may give Guidance on a later lookup.
signature_id, creator_id and guidanceThe image carries a Signature, and guidance says whether it belongs where you found it.

creator_id names the business that owns the Signature. If you own it, or its owner granted you fields of its Record, the job also carries a record with those fields for 24 hours after it completes, as Who can read a Record describes.

Step 3: Act on the advice​

Branch on guidance.advice, and on guidance.share_state where the advice alone is not enough:

allowedThe owner allows the image at this page and time.Nothing: the image is where its owner allows it.
not_allowedThe owner does not allow the image here, or now. A private share state means the owner allows it nowhere in public.Hide the image, or send it to your review process, with the SignatureID and CreatorID.
inconclusiveSASHA could not decide, because the Record restricts the image to some URLs and the lookup carried no publish_url or source_url.Look the image up again with the page it was found on.

Guidance reflects the distribution the owner declared to SASHA. It is not a ruling on the legal status of the image, so treat not_allowed as a signal for your own process, not as proof. Records explains how SASHA evaluates the Record.

See also​