Generate Prompt
Generate a prompt for an elemental.
note
The prompt generated will be saved to the elemental if the save parameter is set to true.
- Anyone can generate a prompt for an elemental.
- Anyone can save a prompt for an elemental if the prompt field is empty.
- The owner of the elemental can generate and save a prompt any time.
- Param
- Query
- Response
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | ✅ | ID of the elemental |
Example
/v1/elemental/your-elemental-id/generate-prompt
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| save | boolean | ❌ | Save the prompt generated to the elemental. |
Example
/v1/elemental/{id}/generate-prompt?save=true
Properties
| Name | Type | Description |
|---|---|---|
| result | string | The prompt generated for the elemental. |
Example
{
"code": 201,
"meta": {
"version": "v1.0.0",
"is_authenticaded": true
},
"response": "This is a prompt generated for the elemental."
}
CURL Example
curl -X POST "https://api-integrations.snackprompt.com/v1/elemental/{id}/generate-prompt?save=true" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY"