API Reference

Create Context Pack

Creating a new context pack requires a name and at least one context item, everything else is optional. The context pack will be created along with its first version, which becomes the context pack's primary version by default.

Endpoint
POST https://api.zatomic.ai/v1/context/packs

Endpoint Request

Request Properties
name
string
Name of the context pack.
description
string, optional
Description for the context pack.
items
list of context item objects

Properties for the context item object:

context_item_id
string
The ID of the context item to include in the context pack.
version_id
string
The ID of the version of the context item to include in the context pack.
prompts
list of prompt objects, optional

Properties for the prompt object:

prompt_id
string
The ID of the prompt to include in the context pack.
version_id
string
The ID of the version of the prompt to include in the context pack.
version_name
string, optional
Name for the context pack version.
Request Body
{
   "name": "Context item name",
   "description": "Context item description.",
   "items": [
      {
         "context_item_id": "Context item ID",
         "version_id": "Context item version ID"
      }
   ],
   "prompts": [
      {
         "prompt_id": "Prompt ID",
         "version_id": "Prompt version ID"
      }
   ],
   "version_name": "Context item version name"
}

Endpoint Response

A successful call returns a 201 status code with a response that contains the context pack object.

HTTP Status Codes
201 Created The context pack was created.
400 Bad Request The context pack name was not provided in the request.
400 Bad Request At least one context item was not provided in the request.
500 Internal Server Error Something went wrong on Zatomic's end.