How to Get By ID
How to Get an Image (iteam) by its ID
You can get an Image (iteam) by its ID by using the API of Snack Prompt. For this, you need to generate an API Key.
How to Generate an API Key
To generate an API Key, follow these steps:
- Log in to your Snack Prompt account.
- Navigate to the API Keys page: https://snackprompt.com/api-keys.
- Click the Create New API Key button.
- Provide a name for your Key to easily identify it later.
- Once created, you can:
- Copy the Key for immediate use.
- Delete the Key when it's no longer needed.
Note: API Keys do not have an expiration date and will remain valid until deleted.

Geting an Image (iteam) by its ID
To get an Image (iteam) by its ID using the API, you can make a GET request to the /v1/elemental/{id} endpoint.
Endpoint
GET /v1/elemental/{id}
Headers
x-api-key: Your API Key.
Make the API Request
With the API Key and the ID of the Image (iteam) in hand, you can make the API request to get the Image (iteam).
Example request:
curl -X GET "https://api-integrations.snackprompt.com/v1/elemental/{id}" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"format": "json", "group_by": "row", "fields": ["id", "title", "description"]}'
Example Response
[
{
"id": "nYT8At9FH",
"is_list": false,
"type": {
"id": 3,
"name": "Document"
},
"category": {
"id": 0,
"name": ""
},
"topics": null,
"title": "Create Document",
"body_content": "<p>testeeeeee</p>",
"body_content_plaintext": "testeeeeee",
"body_content_json": null,
"body_content_placeholders": {
"list": null,
"plaintext": ""
},
"description": "",
"description_plaintext": "",
"visibility": {
"id": 2,
"name": "Unlisted"
},
"images": null,
"cover_images": null,
"avatar_image": null,
"tutorial_steps": null,
"url": "https://release.snackprompt.com/document/create-document-7",
"is_premium": false,
"price": null,
"average_rate": 0,
"video_url": null,
"created_at": "2025-04-23T17:51:35.956007Z",
"updated_at": "2025-04-24T13:00:22.903365Z",
"user": {
"id": "",
"name": "",
"username": "",
"avatar": ""
},
"total_upvotes": 0,
"total_uses": 0,
"total_saves": 0,
"command": ""
}
]
Code Examples
Here are examples of how to consume the API endpoint in different programming languages:
- JavaScript
- Python
- Go
const response = await fetch(
"https://api-integrations.snackprompt.com/v1/elemental/{id}",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
const data = await response.json();
console.log(data);
import requests
url = 'https://api-integrations.snackprompt.com/v1/elemental/{id}'
headers = {
'x-api-key': 'YOUR_API_KEY'
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
package main
import (
"fmt"
"net/http"
)
func main() {
url := "https://api-integrations.snackprompt.com/v1/elemental/{id}"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
The response will be a JSON object containing the complete elemental data. On the Elementals section, you can find more information and the complete response.