Skip to main content

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:

  1. Log in to your Snack Prompt account.
  2. Navigate to the API Keys page: https://snackprompt.com/api-keys.
  3. Click the Create New API Key button.
  4. Provide a name for your Key to easily identify it later.
  5. 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.
How to generate an API Key

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:

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);

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.