Skip to content

Quickstart

Learn how to verify online media using Content Credentials API.

  1. Create an API key

    You can get an API key by signing up at RapidAPI.

  2. Gather Content Credentials for a media URL. In this example, we will use https://opensource.contentauthenticity.org/img/Sunset.jpg.

    Example media

    const request = require('request');
    
    const options = {
      method: 'POST',
      url: 'https://content-credentials.p.rapidapi.com/verify',
      headers: {
        'Content-Type': 'application/json',
        'X-RapidAPI-Key': 'YOUR-API-KEY',
        'X-RapidAPI-Host': 'content-credentials.p.rapidapi.com'
      },
      body: {
        url: 'https://opensource.contentauthenticity.org/img/Sunset.jpg'
      },
      json: true
    };
    
    request(options, function (error, response, body) {
      if (error) throw new Error(error);
    
      console.log(body);
    });
    
    <?php
    
    $client = new http\Client;
    $request = new http\Client\Request;
    
    $body = new http\Message\Body;
    $body->append(json_encode([
        'url' => 'https://opensource.contentauthenticity.org/img/Sunset.jpg'
    ]));
    $request->setRequestUrl('https://content-credentials.p.rapidapi.com/verify');
    $request->setRequestMethod('POST');
    $request->setBody($body);
    
    $request->setHeaders([
        'Content-Type' => 'application/json',
        'X-RapidAPI-Key' => 'YOUR-API-KEY',
        'X-RapidAPI-Host' => 'content-credentials.p.rapidapi.com'
    ]);
    
    $client->enqueue($request)->send();
    $response = $client->getResponse();
    
    echo $response->getBody();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://content-credentials.p.rapidapi.com/verify")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-RapidAPI-Key"] = 'YOUR-API-KEY'
    request["X-RapidAPI-Host"] = 'content-credentials.p.rapidapi.com'
    request.body = "{\"url\": \"https://opensource.contentauthenticity.org/img/Sunset.jpg\"}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://content-credentials.p.rapidapi.com/verify"
    
    payload = { "url": "https://opensource.contentauthenticity.org/img/Sunset.jpg" }
    headers = {
        "Content-Type": "application/json",
        "X-RapidAPI-Key": "YOUR-API-KEY",
        "X-RapidAPI-Host": "content-credentials.p.rapidapi.com"
    }
    
    response = requests.post(url, json=payload, headers=headers)
    
    print(response.json())
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io"
    )
    
    func main() {
    
        url := "https://content-credentials.p.rapidapi.com/verify"
    
        payload := strings.NewReader("{\"url\": \"https://opensource.contentauthenticity.org/img/Sunset.jpg\"}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-RapidAPI-Key", "YOUR-API-KEY")
        req.Header.Add("X-RapidAPI-Host", "content-credentials.p.rapidapi.com")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := io.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://content-credentials.p.rapidapi.com/verify"))
            .header("Content-Type", "application/json")
            .header("X-RapidAPI-Key", "YOUR-API-KEY")
            .header("X-RapidAPI-Host", "content-credentials.p.rapidapi.com")
            .method("POST", HttpRequest.BodyPublishers.ofString("{\"url\":\"https://opensource.contentauthenticity.org/img/Sunset.jpg\"}"))
            .build();
    HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
    System.out.println(response.body());
    
    import Foundation
    
    let headers = [
        "Content-Type": "application/json",
        "X-RapidAPI-Key": "YOUR-API-KEY",
        "X-RapidAPI-Host": "content-credentials.p.rapidapi.com"
    ]
    let parameters = ["url": "https://opensource.contentauthenticity.org/img/Sunset.jpg"] as [String : Any]
    
    let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
    
    let request = NSMutableURLRequest(url: NSURL(string: "https://content-credentials.p.rapidapi.com/verify")! as URL,
                                            cachePolicy: .useProtocolCachePolicy,
                                        timeoutInterval: 10.0)
    request.httpMethod = "POST"
    request.allHTTPHeaderFields = headers
    request.httpBody = postData as Data
    
    let session = URLSession.shared
    let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
        if (error != nil) {
            print(error as Any)
        } else {
            let httpResponse = response as? HTTPURLResponse
            print(httpResponse)
        }
    })
    
    dataTask.resume()
    
  3. The API returns a JSON output with 2 keys: manifest_store and resources.

    manifest_store contains active_manifest and all historical manifests, data describing the source media, editing history and if applicable, AI tools used to generate the final media.

    View Manifest Store
    {
       "active_manifest":"adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2",
       "manifests":{
          "adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2":{
             "claim_generator":"Adobe Photoshop 23.3.2 (build 20220503.r.458 d8a9c44; mac; ContentCredentials 37f01a3)",
             "title":"Sunset.jpg",
             "format":"image/jpeg",
             "instance_id":"xmp:iid:57e3add7-2805-46f6-a48b-d0c0809b3e20",
             "thumbnail":{
                "format":"image/jpeg",
                "identifier":"adobe_urn_uuid_22f2d0fc-ede5-4564-8c49-606b81f8e8f2/c2pa.assertions/c2pa.thumbnail.claim.jpeg"
             },
             "ingredients":[
                {
                   "title":"AdobeStock_121552328.jpeg",
                   "format":"image/jpeg",
                   "document_id":"xmp.did:F68EA543D3B0E51189B599B9DC9DA10B",
                   "instance_id":"xmp.iid:6EB9E85432B6E5118A8486F38ECF36FE",
                   "thumbnail":{
                      "format":"image/jpeg",
                      "identifier":"adobe_urn_uuid_ce3df57a-ce50-47db-a36e-1230b7eb1d8a/c2pa.assertions/c2pa.thumbnail.claim.jpeg"
                   },
                   "relationship":"parentOf",
                   "active_manifest":"adobe:urn:uuid:ce3df57a-ce50-47db-a36e-1230b7eb1d8a",
                   "metadata":{
                      "dateTime":"2022-05-16T17:56:46.903Z"
                   }
                },
                {
                   "title":"5a680667-6da9-d84c-a5a4-bc27a6bb7e2e.jpg",
                   "format":"image/jpeg",
                   "document_id":"xmp.did:a0ca6da8-6bc2-4d37-b4e1-a5867a933899",
                   "instance_id":"xmp.iid:a0ca6da8-6bc2-4d37-b4e1-a5867a933899",
                   "thumbnail":{
                      "format":"image/jpeg",
                      "identifier":"adobe_urn_uuid_22f2d0fc-ede5-4564-8c49-606b81f8e8f2/c2pa.assertions/c2pa.thumbnail.ingredient.jpeg"
                   },
                   "relationship":"componentOf",
                   "metadata":{
                      "dateTime":"2022-05-16T17:59:58.802Z"
                   }
                }
             ],
             "credentials":[
                {
                   "@context":[
                      "https://www.w3.org/2018/credentials/v1"
                   ],
                   "credentialSubject":{
                      "id":"did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54",
                      "name":"Pia Blumenthal"
                   },
                   "proof":{
                      "created":"2022-05-16T17:48:41.584627894Z",
                      "jws":"f119a2c5f74685624e5a0c805cae584263e1d5d2ef25b62f631aca23c512894d0d0dbec591140016adbd0ca86b388318f47e6dd8fce7cb59ea33742295a38fe06",
                      "proofPurpose":"assertionMethod",
                      "type":"Ed25519Signature2018",
                      "verificationMethod":"did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54"
                   },
                   "type":[
                      "VerifiableCredential"
                   ]
                }
             ],
             "assertions":[
                {
                   "label":"adobe.beta",
                   "data":{
                      "version":"0.12.5"
                   },
                   "kind":"Json"
                },
                {
                   "label":"adobe.dictionary",
                   "data":{
                      "url":"https://cai-assertions.adobe.com/photoshop/dictionary.json"
                   },
                   "kind":"Json"
                },
                {
                   "label":"stds.schema-org.CreativeWork",
                   "data":{
                      "@context":"https://schema.org",
                      "@type":"CreativeWork",
                      "author":[
                         {
                            "@type":"Person",
                            "credential":[
                               {
                                  "alg":"sha256",
                                  "hash":"E2GU8gkD5sdf1f/3VDQ8uVmGy+a8OOezs+DEJywDg2Y=",
                                  "url":"self#jumbf=/c2pa/adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2/c2pa.credentials/did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54"
                               }
                            ],
                            "identifier":"did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54",
                            "name":"Pia Blumenthal"
                         },
                         {
                            "@id":"https://www.behance.net/piablumenthal2",
                            "@type":"Person",
                            "credential":[
                               {
                                  "alg":"sha256",
                                  "hash":"E2GU8gkD5sdf1f/3VDQ8uVmGy+a8OOezs+DEJywDg2Y=",
                                  "url":"self#jumbf=/c2pa/adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2/c2pa.credentials/did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54"
                               }
                            ],
                            "identifier":"did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54",
                            "name":"Pia Blumenthal"
                         },
                         {
                            "@id":"https://www.instagram.com/ppppiaaaa",
                            "@type":"Person",
                            "credential":[
                               {
                                  "alg":"sha256",
                                  "hash":"E2GU8gkD5sdf1f/3VDQ8uVmGy+a8OOezs+DEJywDg2Y=",
                                  "url":"self#jumbf=/c2pa/adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2/c2pa.credentials/did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54"
                               }
                            ],
                            "identifier":"did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54",
                            "name":"ppppiaaaa"
                         },
                         {
                            "@id":"https://twitter.com/pia___b",
                            "@type":"Person",
                            "credential":[
                               {
                                  "alg":"sha256",
                                  "hash":"E2GU8gkD5sdf1f/3VDQ8uVmGy+a8OOezs+DEJywDg2Y=",
                                  "url":"self#jumbf=/c2pa/adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2/c2pa.credentials/did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54"
                               }
                            ],
                            "identifier":"did:adobe:f68e498f51ffd0a70dff98fec87cfd834107424ae0c13775bc17e60bd15e66f54",
                            "name":"pia___b"
                         }
                      ]
                   },
                   "kind":"Json"
                },
                {
                   "label":"c2pa.actions",
                   "data":{
                      "actions":[
                         {
                            "action":"c2pa.edited",
                            "parameters":{
                               "name":"open"
                            }
                         },
                         {
                            "action":"c2pa.edited",
                            "parameters":{
                               "name":"crop"
                            }
                         },
                         {
                            "action":"c2pa.edited",
                            "parameters":{
                               "name":"sky_replacement"
                            }
                         },
                         {
                            "action":"c2pa.edited",
                            "parameters":{
                               "name":"layer_visibility"
                            }
                         }
                      ],
                      "metadata":{
                         "dateTime":"2022-05-16T17:56:46.873Z",
                         "reviewRatings":[
    
                         ]
                      }
                   }
                }
             ],
             "signature_info":{
                "issuer":"Adobe Inc.",
                "cert_serial_number":"117468664790937121336398959340346743515",
                "time":"2022-05-16T18:01:24+00:00"
             },
             "label":"adobe:urn:uuid:22f2d0fc-ede5-4564-8c49-606b81f8e8f2"
          },
          "adobe:urn:uuid:ce3df57a-ce50-47db-a36e-1230b7eb1d8a":{
             "claim_generator":"Adobe Stock",
             "title":"AdobeStock_121552328.jpeg",
             "format":"image/jpeg",
             "instance_id":"xmp.iid:6EB9E85432B6E5118A8486F38ECF36FE",
             "thumbnail":{
                "format":"image/jpeg",
                "identifier":"adobe_urn_uuid_ce3df57a-ce50-47db-a36e-1230b7eb1d8a/c2pa.assertions/c2pa.thumbnail.claim.jpeg"
             },
             "ingredients":[
    
             ],
             "assertions":[
                {
                   "label":"adobe.beta",
                   "data":{
                      "version":"0.12.5"
                   },
                   "kind":"Json"
                },
                {
                   "label":"stds.schema-org.CreativeWork",
                   "data":{
                      "@context":"https://schema.org",
                      "@type":"CreativeWork",
                      "url":"https://stock.adobe.com/121552328"
                   },
                   "kind":"Json"
                },
                {
                   "label":"adobe.dictionary",
                   "data":{
                      "url":"https://cai-assertions.adobe.com/stock/dictionary.json"
                   },
                   "kind":"Json"
                },
                {
                   "label":"c2pa.actions",
                   "data":{
                      "actions":[
                         {
                            "action":"adobe.delivered"
                         }
                      ]
                   }
                }
             ],
             "signature_info":{
                "issuer":"Adobe Inc.",
                "cert_serial_number":"121561926467332750920512530884092488196",
                "time":"2022-05-13T13:00:24+00:00"
             },
             "label":"adobe:urn:uuid:ce3df57a-ce50-47db-a36e-1230b7eb1d8a"
          }
       }
    }
    

    resources object contain Base64 encoded thumbnails.

    The source image: Source image

    The ingredient: Ingredient

    The final image: Final

  4. Try it yourself in API playground