Legacy API
Legacy API
These endpoints are part of the legacy neuroflash API and are no longer actively developed. For new integrations, use the modern Content Generation endpoints.
Generate Text
POST
/api/word-embedding/generate_textRequest Body
FieldTypeRequiredDescription
keywordsstringNoThe keywords to base output generation on.keywords2stringNoThe second keywords to base output generation on.extra_inputstringNoAn extra input to base output generation on.extra_input2stringNoAnother extra input to base output generation on.textstringNoText to generate outputs about.tonalityarray<string>NoSteer the tonality parameter to be inserted into a suitable prompt.lengthstringNoSteer the length parameter to be inserted into a suitable prompt.output_typestringYesWhich output type to generate.audience_model_idstringYesWhich prompt/success-model to use.n_timesintegerNoHow often to run the resulting prompts in parallel and accumulate all resultsn_text_itemsintegerNoHow many text items to generate. Overrides n_times logic.qualitystringNoAn enumeration.personalitystringNoText to describe a personalitypersonality_idintegerNoIdentifier for the personality (if present)informationarray<object>NoContext information to base the output generation on.
idintegerYescontentstringYescategory_namestringNobrand_voiceobjectNoA dictionary representing the brand voice to be used for text generation.brand_voice_idstringNoIdentifier for the brand voice (if present)audienceobjectNoA dictionary representing the audience to be used for text generation.target_audience_idstringNoID of the audienceResponse
FieldTypeDescription
outputsarray<object>Generated outputs based on the inputs.
textstringgeneration_idintegertext_item_idstringn_tokens_inputintegern_tokens_usedintegern_tokens_shownintegern_words_inputintegern_words_usedintegern_words_shownintegerExample
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/word-embedding/generate_text" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": [],
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": [],
"brand_voice": {},
"brand_voice_id": "string",
"audience": {},
"target_audience_id": "string"
}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/word-embedding/generate_text",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": [],
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": [],
"brand_voice": {},
"brand_voice_id": "string",
"audience": {},
"target_audience_id": "string"
},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/word-embedding/generate_text`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": [],
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": [],
"brand_voice": {},
"brand_voice_id": "string",
"audience": {},
"target_audience_id": "string"
}),
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": []any{},
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": []any{},
"brand_voice": map[string]any{},
"brand_voice_id": "string",
"audience": map[string]any{},
"target_audience_id": "string",
})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/word-embedding/generate_text", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{
"outputs": [
{
"text": "This is a very innovative subject line.",
"generation_id": 12345,
"text_item_id": "d911f60c-779e-425e-86d2-c8d9f1d5c93b"
}
],
"n_tokens_input": 0,
"n_tokens_used": 0,
"n_tokens_shown": 0,
"n_words_input": 0,
"n_words_used": 0,
"n_words_shown": 0
}
Generate Text Stream
POST
/api/word-embedding/generate_text_streamRequest Body
FieldTypeRequiredDescription
keywordsstringNoThe keywords to base output generation on.keywords2stringNoThe second keywords to base output generation on.extra_inputstringNoAn extra input to base output generation on.extra_input2stringNoAnother extra input to base output generation on.textstringNoText to generate outputs about.tonalityarray<string>NoSteer the tonality parameter to be inserted into a suitable prompt.lengthstringNoSteer the length parameter to be inserted into a suitable prompt.output_typestringYesWhich output type to generate.audience_model_idstringYesWhich prompt/success-model to use.n_timesintegerNoHow often to run the resulting prompts in parallel and accumulate all resultsn_text_itemsintegerNoHow many text items to generate. Overrides n_times logic.qualitystringNoAn enumeration.personalitystringNoText to describe a personalitypersonality_idintegerNoIdentifier for the personality (if present)informationarray<object>NoContext information to base the output generation on.
idintegerYescontentstringYescategory_namestringNobrand_voiceobjectNoA dictionary representing the brand voice to be used for text generation.brand_voice_idstringNoIdentifier for the brand voice (if present)audienceobjectNoA dictionary representing the audience to be used for text generation.target_audience_idstringNoID of the audienceResponse
FieldTypeDescription
outputsarray<object>Generated outputs based on the inputs.
textstringgeneration_idintegertext_item_idstringn_tokens_inputintegern_tokens_usedintegern_tokens_shownintegern_words_inputintegern_words_usedintegern_words_shownintegerExample
- cURL
- Python
- Node.js
- Go
curl -X POST "https://app.neuroflash.com/api/word-embedding/generate_text_stream" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": [],
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": [],
"brand_voice": {},
"brand_voice_id": "string",
"audience": {},
"target_audience_id": "string"
}'
import requests
response = requests.post(
f"https://app.neuroflash.com/api/word-embedding/generate_text_stream",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": [],
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": [],
"brand_voice": {},
"brand_voice_id": "string",
"audience": {},
"target_audience_id": "string"
},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/word-embedding/generate_text_stream`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": [],
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": [],
"brand_voice": {},
"brand_voice_id": "string",
"audience": {},
"target_audience_id": "string"
}),
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{
"keywords": "string",
"keywords2": "string",
"extra_input": "string",
"extra_input2": "string",
"text": "string",
"tonality": []any{},
"length": "string",
"output_type": "string",
"audience_model_id": "string",
"n_times": 0,
"n_text_items": 0,
"quality": "string",
"personality": "string",
"personality_id": 0,
"information": []any{},
"brand_voice": map[string]any{},
"brand_voice_id": "string",
"audience": map[string]any{},
"target_audience_id": "string",
})
req, _ := http.NewRequest("POST", "https://app.neuroflash.com/api/word-embedding/generate_text_stream", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
{
"outputs": [
{
"text": "This is a very innovative subject line.",
"generation_id": 12345,
"text_item_id": "d911f60c-779e-425e-86d2-c8d9f1d5c93b"
}
],
"n_tokens_input": 0,
"n_tokens_used": 0,
"n_tokens_shown": 0,
"n_words_input": 0,
"n_words_used": 0,
"n_words_shown": 0
}
Get Prompts
GET
/api/word-embedding/get_promptsExample
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/word-embedding/get_prompts" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/word-embedding/get_prompts",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/word-embedding/get_prompts`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/word-embedding/get_prompts", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
[
{
"country": "de",
"language": "de",
"output_type": {
"id": "string",
"label": "string"
},
"output_type_category": {
"id": "string",
"label": "string"
},
"n_times": 1,
"n_text_items": 2,
"display_in_select": false,
"text": {
"label": "string",
"placeholder": "string",
"prefill_value": "string",
"character_limit": 600
},
"keywords": {
"label": "string",
"placeholder": "string",
"prefill_value": "string",
"character_limit": 600
},
"keywords2": {
"label": "string",
"placeholder": "string",
"prefill_value": "string",
"character_limit": 600
},
"video_id": "string",
"output_type_description": "string"
}
]
Get Prompts by Country and Language
GET
/api/word-embedding/get_prompts/{country}/{language}Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
country | string | Yes | |
language | string | Yes |
Example
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/word-embedding/get_prompts/{country}/{language}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/word-embedding/get_prompts/{country}/{language}",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/word-embedding/get_prompts/${country}/${language}`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/word-embedding/get_prompts/"+country+"/"+language+"", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
Response:
[
{
"country": "de",
"language": "de",
"output_type": {
"id": "string",
"label": "string"
},
"output_type_category": {
"id": "string",
"label": "string"
},
"n_times": 1,
"n_text_items": 2,
"display_in_select": false,
"text": {
"label": "string",
"placeholder": "string",
"prefill_value": "string",
"character_limit": 600
},
"keywords": {
"label": "string",
"placeholder": "string",
"prefill_value": "string",
"character_limit": 600
},
"keywords2": {
"label": "string",
"placeholder": "string",
"prefill_value": "string",
"character_limit": 600
},
"video_id": "string",
"output_type_description": "string"
}
]