Skip to main content

Brand Voice Pipeline

This guide walks you through importing a brand voice from your website, verifying the result, and using it to generate on-brand content.

What you'll build

  • Import a brand voice from a URL (draft/preview)
  • Save the draft to your workspace
  • Use it as a system message in chat completions
  • List your workspace's brand voices

Prerequisites

  • A neuroflash account with API access
  • Your client_id and client_secret (see Authentication)

Step 1: Authenticate

curl -X POST https://id.neuroflash.com/oauth/v2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=openid"

Step 2: Get Your Workspace

curl "https://app.neuroflash.com/api/workspace-service/v1/workspaces" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Step 3: Import from URL (Get the Draft)

This endpoint is asynchronous

Brand voice import involves AI analysis and may take 10–30 seconds.

curl -X POST "https://app.neuroflash.com/api/brand-voice-service/v1/workspaces/{workspace_id}/brand-voice-url-imports" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"audienceModelId": "538b1efc6f88ad88feebf7acd8c618facb54fe82",
"country": "us",
"language": "en",
"url": "https://your-brand.com"
}'

Response:

{
"brandVoice": {
"name": "neuroflash",
"description": "A clear, confident, and human tone that emphasises speed, simplicity, and trust. Prefers active voice, short sentences, and practical examples over jargon.",
"language": "en",
"country": "us"
},
"brand": {
"name": "neuroflash",
"values": ["innovation", "simplicity"],
"phones": []
}
}
What you get back is a proposal

The import response contains no id and is not saved to your workspace. The brandVoice object is a draft — an AI-extracted style profile ready to be reviewed and saved.

Alternative: Create manually

If you want full control over the brand voice settings from the start, use POST /brand-voices with creationSourceType: "manual" and a brand object instead. The import endpoints are faster for bootstrapping but require a publicly accessible URL.

Import parameters reference

ParameterDescriptionDefault
audienceModelIdEmbedding model for audience analysis538b1efc6f88ad88feebf7acd8c618facb54fe82
country2-letter ISO country code, lowercase— (required)
language2-letter ISO language code, lowercase— (required)

Note: country and language must form a valid pair. Refer to the supported locale pairs table.

Step 4: Save the Brand Voice

The import response is a draft. To persist it, pass the extracted attributes to POST /brand-voices:

curl -X POST "https://app.neuroflash.com/api/brand-voice-service/v1/workspaces/{workspace_id}/brand-voices" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "neuroflash",
"description": "A clear, confident, and human tone that emphasises speed, simplicity, and trust.",
"language": "en",
"country": "us",
"creationSourceType": "url",
"creationSourceURL": "https://your-brand.com",
"brand": { "name": "neuroflash", "values": ["innovation", "simplicity"], "phones": [] }
}'

Response (the brand voice is now saved with an id and workspaceId):

{
"id": "7d3a6a83-2e19-4dcb-a8a0-5d8f2f8c1c6f",
"workspaceId": "b481b98b-a7ed-4d72-a1f2-8b2ae3a57854",
"name": "neuroflash",
"description": "A clear, confident, and human tone that emphasises speed, simplicity, and trust.",
"language": "en",
"country": "us",
"createdAt": "2026-04-09T12:00:00Z"
}

Step 5: Verify the Brand Voice

curl "https://app.neuroflash.com/api/brand-voice-service/v1/workspaces/{workspace_id}/brand-voices/{brand_voice_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Key fields: id, name, description, language, country.

Step 6: Use in Content Generation

Pass brandVoice.description as a system message. This is the recommended pattern for keeping generated content on-brand.

curl -X POST "https://app.neuroflash.com/api/ds-prototypes/chat/completions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-workspace-id: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4.1-mini",
"messages": [
{ "role": "system", "content": "Follow this brand voice: A clear, confident, and human tone..." },
{ "role": "user", "content": "Write a product announcement for our new feature." }
]
}'

Step 7: List Your Brand Voices

curl "https://app.neuroflash.com/api/brand-voice-service/v1/workspaces/{workspace_id}/brand-voices" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"