- Create Client ID and Client Secret
Brand Review API (v1)
Use the Brand Review REST API to evaluate input content and assets against brand guidelines using AI-powered analysis.
The API analyzes content provided in the request, such as text, images, and files, by comparing it against brand kit sections for a specific tenant and organization. The analysis can evaluate content against all brand kit sections or selected sections, such as Brand Context, Global Goals, and Tone of Voice. SitecoreAI generates compliance scores, explanations, and improvement suggestions based on this analysis.
Use this REST API to:
- Provide content in the request body for brand evaluation against brand kit guidelines.
- Assess how the input content aligns with specific brand kit sections and subsections (fields), including Brand Context, Do’s and Don’ts, Tone of Voice, Grammar Checklists, and Visual Guidelines.
- Receive a brand compliance score for the input content on a scale from 1 to 5, where 5 indicates the highest level of alignment with the brand guidelines.
- Evaluate multiple input formats, including text, images, PDFs, metadata, Markdown, and JSON.
After a review is generated, teams can use the results to enforce brand consistency at scale, validate content in real time using AI-suggested improvements, and reduce compliance risk by identifying brand, legal, and accessibility issues. Compliance scores and explanations help pinpoint problem areas at the section or field level and reveal recurring trends across content.
Note the following:
- Requests typically complete within 5 seconds. Batching is not supported.
- Multiple input formats are supported, including content from SitecoreAI or XP pages.
- To use this REST API, you must authenticate all API requests.
- All API requests are made in your production environment.
For more information, see the official Sitecore documentation.
The Brand Review REST API uses the OAuth 2.0 standard with JSON web tokens to authorize REST API requests.
- In the Sitecore Cloud Portal, open Stream.
- Click Admin > AI APIs keys > Create credential.
- In the Create New Client dialog, enter a name and description for the client. Then click Create. The Client ID and Client Secret display.
- Copy the Client ID and Client Secret because you won't be able to view them again in Stream. You'll use them to request an access token.
Run the following cURL command to request an access token. Replace the placeholder values with your Client ID and Client Secret.
curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={YOUR_API_KEY}' \
--data-urlencode 'client_secret={YOUR_API_SECRET}' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'audience=https://api.sitecorecloud.io'In the response, the access_token key contains the access token:
{
"access_token": "{YOUR_ACCESS_TOKEN}",
"scope": "ai.orgs.br:gen ai.org.brd:w ai.org.brd:r ai.org.docs:w ai.org.docs:r ai.org:admin",
"expires_in": 86400,
"token_type": "Bearer"
}Access tokens expire in 24 hours. If your requests unexpectedly return a response with status 401 Unauthorized, request a new access token by repeating this POST request.
We recommend that you cache the access token for 24 hours to avoid repeating this POST request while the access token is still valid.