Download OpenAPI specification:Download
API over the Natural Language Generation library RosaeNLG, on AWS lambda.
templateId required | string Example: chanson ID of the template |
X-RapidAPI-User | string ID of the user, when going through Rapid API |
{- "templateSha1": "1bfdbcd203ec8e6f889b068fbb2d7d298b1db903",
- "templateContent": {
- "templateId": "chanson",
- "src": {
- "entryTemplate": "chanson.pug",
- "compileInfo": {
- "activate": false,
- "compileDebug": false,
- "language": "fr_FR"
}, - "templates": {
- "chanson.pug": "p\n | il #[+verb(getAnonMS(), {verb: 'chanter', tense:'FUTUR'} )]\n | \"#{chanson.nom}\"\n | de #{chanson.auteur}\n"
}
}, - "user": "DEFAULT_USER"
}
}
Renders an existing template using data passed in the request. Payload is in additionnal properties of the input.
language required | string Enum: "fr_FR" "de_DE" "it_IT" "en_US" "es_ES" "OTHER" Example: fr_FR language |
templateId required | string Example: chanson ID of the template |
templateSha1 required | string Example: 1bfdbcd203ec8e6f889b068fbb2d7d298b1db903 sha1 of the template (from create call) |
X-RapidAPI-User | string ID of the user, when going through Rapid API |
language required | string Enum: "fr_FR" "en_US" "de_DE" "it_IT" "es_ES" "OTHER" the language of the template |
forceRandomSeed | integer the random seed value, if it must be forced |
defaultSynoMode | string default mode for synonyms |
defaultAmong | integer default value for among |
renderDebug | boolean activate render debug (default false) |
property name* | any |
{- "language": "fr_FR",
- "chanson": {
- "auteur": "Édith Piaf",
- "nom": "Non, je ne regrette rien"
}
}
{- "renderedText": "<p>Il chantera \"Non, je ne regrette rien\" d'Édith Piaf</p>",
- "renderOptions": {
- "language": "fr_FR"
}, - "templateSha1": "someSha1",
- "outputData": { }
}
Creates a template from a JSON containing a packaged template.
The template is validated, loaded, autotested (if configured so), and saved on disk or S3 if persistent storage is set.
It can be either a real template with code etc., or a template that points to another existing one (use type existing and which property).
language required | string Enum: "fr_FR" "de_DE" "it_IT" "en_US" "es_ES" "OTHER" Example: fr_FR language |
X-RapidAPI-User | string ID of the user, when going through Rapid API |
format | string version of the format |
templateId required | string ID of the template |
type | string Enum: "existing" "custom" Type of the template.
|
which | string Template name to refer to (target template must contain src and be custom type. Use only when type is existing. |
custom | object Custom content for templates, generally when type is existing, to store specific personalization content for a generic template pointed by which |
object source of the template | |
object the pre compiled template |
{- "templateId": "chanson",
- "src": {
- "entryTemplate": "chanson.pug",
- "compileInfo": {
- "compileDebug": false,
- "language": "fr_FR"
}, - "templates": {
- "chanson.pug": "p\n | il #[+verb(getAnonMS(), {verb: 'chanter', tense:'FUTUR'} )]\n | \"#{chanson.nom}\"\n | de #{chanson.auteur}\n"
}, - "autotest": {
- "activate": true,
- "input": {
- "language": "fr_FR",
- "chanson": {
- "auteur": "Édith Piaf",
- "nom": "Non, je ne regrette rien"
}
}, - "expected": [
- "Il chantera \"Non, je ne regrette rien\" d'Édith Piaf"
]
}
}
}
{- "templateId": "chanson",
- "templateSha1": "1bfdbcd203ec8e6f889b068fbb2d7d298b1db903",
- "ms": 37.48320007324219
}