Legacy-API
Legacy API
Diese Endpoints sind Teil der alten neuroflash API und werden nicht mehr aktiv weiterentwickelt. Fuer neue Integrationen verwenden Sie die modernen Inhaltsgenerierungs-Endpoints.
Text generieren
POST
/api/word-embedding/generate_textAnfrage-Body
FeldTypErforderlichBeschreibung
keywordsstringNeinDie Schlüsselwörter für die Ausgabegenerierung.keywords2stringNeinDie zweiten Schlüsselwörter für die Ausgabegenerierung.extra_inputstringNeinEine zusätzliche Eingabe zur Grundlage der Ausgabegenerierung.extra_input2stringNeinEine weitere zusätzliche Eingabe zur Grundlage der Ausgabegenerierung.textstringNeinText zur Generierung von Ausgaben.tonalityarray<string>NeinDen Tonalitätsparameter steuern, um ihn in eine geeignete Aufforderung einzufügen.lengthstringNeinDen Längeparameter steuern, um ihn in eine geeignete Aufforderung einzufügen.output_typestringJaWelcher Ausgabetyp generiert werden soll.audience_model_idstringJaWelche Aufforderung/welches Erfolgsmodell verwendet werden soll.n_timesintegerNeinWie oft die resultierenden Aufforderungen parallel ausgeführt und alle Ergebnisse akkumuliert werden sollen.n_text_itemsintegerNeinWie viele Textelemente generiert werden sollen. Überschreibt n_times-Logik.qualitystringNeinEine Aufzählung.personalitystringNeinText zur Beschreibung einer Persönlichkeit.personality_idintegerNeinBezeichner für die Persönlichkeit (falls vorhanden).informationarray<object>NeinKontextinformationen zur Grundlage der Ausgabegenerierung.
idintegerJacontentstringJacategory_namestringNeinbrand_voiceobjectNeinEin Wörterbuch, das die Brand Voice für die Textgenerierung darstellt.brand_voice_idstringNeinBezeichner für Brand Voice (falls vorhanden).audienceobjectNeinEin Wörterbuch, das die Zielgruppe für die Textgenerierung darstellt.target_audience_idstringNeinID der Zielgruppe.Antwort
FeldTypBeschreibung
outputsarray<object>Generierte Ausgaben auf Grundlage der Eingaben.
textstringgeneration_idintegertext_item_idstringn_tokens_inputintegern_tokens_usedintegern_tokens_shownintegern_words_inputintegern_words_usedintegern_words_shownintegerBeispiel
- 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()
Antwort:
{
"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
}
Textstrom generieren.
POST
/api/word-embedding/generate_text_streamAnfrage-Body
FeldTypErforderlichBeschreibung
keywordsstringNeinDie Schlüsselwörter für die Ausgabegenerierung.keywords2stringNeinDie zweiten Schlüsselwörter für die Ausgabegenerierung.extra_inputstringNeinEine zusätzliche Eingabe zur Grundlage der Ausgabegenerierung.extra_input2stringNeinEine weitere zusätzliche Eingabe zur Grundlage der Ausgabegenerierung.textstringNeinText zur Generierung von Ausgaben.tonalityarray<string>NeinDen Tonalitätsparameter steuern, um ihn in eine geeignete Aufforderung einzufügen.lengthstringNeinDen Längeparameter steuern, um ihn in eine geeignete Aufforderung einzufügen.output_typestringJaWelcher Ausgabetyp generiert werden soll.audience_model_idstringJaWelche Aufforderung/welches Erfolgsmodell verwendet werden soll.n_timesintegerNeinWie oft die resultierenden Aufforderungen parallel ausgeführt und alle Ergebnisse akkumuliert werden sollen.n_text_itemsintegerNeinWie viele Textelemente generiert werden sollen. Überschreibt n_times-Logik.qualitystringNeinEine Aufzählung.personalitystringNeinText zur Beschreibung einer Persönlichkeit.personality_idintegerNeinBezeichner für die Persönlichkeit (falls vorhanden).informationarray<object>NeinKontextinformationen zur Grundlage der Ausgabegenerierung.
idintegerJacontentstringJacategory_namestringNeinbrand_voiceobjectNeinEin Wörterbuch, das die Brand Voice für die Textgenerierung darstellt.brand_voice_idstringNeinBezeichner für Brand Voice (falls vorhanden).audienceobjectNeinEin Wörterbuch, das die Zielgruppe für die Textgenerierung darstellt.target_audience_idstringNeinID der Zielgruppe.Antwort
FeldTypBeschreibung
outputsarray<object>Generierte Ausgaben auf Grundlage der Eingaben.
textstringgeneration_idintegertext_item_idstringn_tokens_inputintegern_tokens_usedintegern_tokens_shownintegern_words_inputintegern_words_usedintegern_words_shownintegerBeispiel
- 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()
Antwort:
{
"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
}
Prompts abrufen
GET
/api/word-embedding/get_promptsBeispiel
- 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()
Antwort:
[
{
"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"
}
]
Prompts nach Land und Sprache abrufen
GET
/api/word-embedding/get_prompts/{country}/{language}Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
country | string | Ja | |
language | string | Ja |
Beispiel
- 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()
Antwort:
[
{
"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"
}
]