For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Models

Request and response schemas for the SnackPrompt AI Engine API.

Requests

IngestRequest

Used in POST /v1/kb/elemental

{
  "elemental_id": "string",
  "trace_id": "string (optional)"
}
Field
Type
Required
Description

elemental_id

string

Yes

ID of elemental to ingest

trace_id

string

No

ID for tracking


SearchRequest

Used in POST /v1/kb/search

{
  "query": "string",
  "filters": {
    "tenant_id": "string",
    "elemental_id": "string (optional)",
    "user_id": "string (optional)",
    "tag_ids": ["string"],
    "tag_names": ["string"],
    "source": "string (optional)",
    "type_name": "string (optional)",
    "category_name": "string (optional)"
  },
  "limit": 10
}
Field
Type
Required
Description

query

string

Yes

Search text

filters

Filters

Yes

Filters object

limit

number

No

Maximum results (default: 10)


ChatRequest

Used in POST /v1/kb/chat and POST /v1/kb/chat/stream

Field
Type
Required
Description

query

string

Yes

User question

filters

Filters

Yes

Filters object


DeleteRequest

Used in POST /v1/kb/delete

Field
Type
Required
Description

filters

Filters

Yes

Filters object (tenant_id required)


Filters

Filters object used in various requests.

Field
Type
Required
Description

tenant_id

string

Yes

Tenant ID

elemental_id

string

No

Elemental ID

user_id

string

No

User ID

tag_ids

string[]

No

Tag IDs (OR)

tag_names

string[]

No

Tag names (OR)

source

string

No

Source type

type_name

string

No

Elemental type

category_name

string

No

Category


Responses

IngestResponse

Returned by POST /v1/kb/elemental

Field
Type
Description

status

string

Operation status (accepted)

message

string

Descriptive message

data.job_id

string

Job ID (trace_id or generated)

data.elemental_id

string

ID of elemental being ingested


DeleteResponse

Returned by DELETE /v1/kb/elemental/{id} and POST /v1/kb/delete

Field
Type
Description

status

string

Operation status (success)

message

string

Descriptive message

data

object

Operation details


SearchResponse

Returned by POST /v1/kb/search

Field
Type
Description

items

SearchItem[]

Results list

total_found

number

Total results found


SearchItem

Individual search result item.

Field
Type
Description

id

string

UUID of point in Qdrant

score

number

Similarity score (0-1)

payload

ItemPayload

Item metadata


ItemPayload

Metadata stored with each chunk.

Field
Type
Description

tenant_id

string

Tenant ID

user_id

string

User ID

snack_elemental_id

string

Source elemental ID

snack_column_id

string

Column ID (if applicable)

snack_item_id

string

Item ID

source

string

Source type

type_name

string

Elemental type

category_name

string

Category

original_text

string

Original content

tag_ids

string[]

Tag IDs

tag_names

string[]

Tag names


ChatResponse

Returned by POST /v1/kb/chat

Field
Type
Description

answer

string

AI-generated answer

sources

ChatSource[]

Sources used


ChatSource

Source used to generate chat response.

Field
Type
Description

id

string

UUID of point in Qdrant

score

number

Similarity score

snack_item_id

string

Source item ID

snack_elemental_id

string

Source elemental ID

text

string

Excerpt used as context

tag_ids

string[]

Tag IDs

tag_names

string[]

Tag names


ChatStreamEvent

SSE event returned by POST /v1/kb/chat/stream

Message event:

Error event:

End of stream:


HealthResponse

Returned by GET /health


DetailedHealthResponse

Returned by GET /health/detailed


ErrorResponse

Returned in case of error.

Or with validation details:

Last updated

Was this helpful?