Examples API
8 operations. Authentication, errors and pagination work as described in the REST API overview.
Approve a submitted example (prompt owner or admin)
POST/api/v1/examples/{id}/approveToken required · scope write
| Name | Type | Description |
|---|---|---|
id pathrequired | string | Example id |
Request body (optional)
| Name | Type | Description |
|---|---|---|
notes | string | null |
Responses: 200 OK400, 401, 403, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
versionNumberrequired | integer (-9007199254740991–9007199254740991) | |
modelrequired | object | null | |
variablesrequired | object | |
outputTextrequired | string | |
mediaIdsrequired | string[] | |
authorrequired | object | |
approvalrequired | "pending" | "approved" | "rejected" | |
notesrequired | string | null | |
positionrequired | integer (-9007199254740991–9007199254740991) | |
contentRatingrequired | "general" | "mature" | "explicit" | |
createdAtrequired | string | ISO 8601 timestamp (UTC) |
updatedAtrequired | string | ISO 8601 timestamp (UTC) |
viewerrequired | object |
curl -X POST 'https://incantory.ai/api/v1/examples/{id}/approve' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'Reject a submitted example (prompt owner or admin)
POST/api/v1/examples/{id}/rejectToken required · scope write
| Name | Type | Description |
|---|---|---|
id pathrequired | string | Example id |
Request body (optional)
| Name | Type | Description |
|---|---|---|
notes | string | null |
Responses: 200 OK400, 401, 403, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
versionNumberrequired | integer (-9007199254740991–9007199254740991) | |
modelrequired | object | null | |
variablesrequired | object | |
outputTextrequired | string | |
mediaIdsrequired | string[] | |
authorrequired | object | |
approvalrequired | "pending" | "approved" | "rejected" | |
notesrequired | string | null | |
positionrequired | integer (-9007199254740991–9007199254740991) | |
contentRatingrequired | "general" | "mature" | "explicit" | |
createdAtrequired | string | ISO 8601 timestamp (UTC) |
updatedAtrequired | string | ISO 8601 timestamp (UTC) |
viewerrequired | object |
curl -X POST 'https://incantory.ai/api/v1/examples/{id}/reject' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'List approved examples (plus your queue)
GET/api/v1/prompts/{owner}/{slug}/examplesToken optional
Approved examples in the author's order, keyset-paginated (cursor). model filters by model slug, version by version number. Signed-in callers also get queue: every pending example for the prompt owner/admins, otherwise their own pending and rejected submissions.
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
version query | integer (…–9007199254740991) | |
model query | string | |
cursor query | string | |
limit query | integer (1–100) |
Responses: 200 OK304, 400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
itemsrequired | object[] | |
nextCursorrequired | string | null | |
queuerequired | object[] | Pending examples you may see |
pendingCountrequired | integer (-9007199254740991–9007199254740991) | null | |
canModeraterequired | boolean | |
signedInrequired | boolean |
curl 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/examples' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Submit an example output
POST/api/v1/prompts/{owner}/{slug}/examplesToken required · scope write
Pending until the prompt owner approves it (the owner is notified); the owner's own examples are approved immediately. mediaIds must be media you uploaded.
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
Request body
| Name | Type | Description |
|---|---|---|
version | integer (…–9007199254740991) | |
model | string | null | |
variables | object | |
outputText | string | |
mediaIds | string[] | |
notes | string | null | |
contentRating | "general" | "mature" |
Responses: 201 OK400, 401, 403, 404, 409, 413, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
versionNumberrequired | integer (-9007199254740991–9007199254740991) | |
modelrequired | object | null | |
variablesrequired | object | |
outputTextrequired | string | |
mediaIdsrequired | string[] | |
authorrequired | object | |
approvalrequired | "pending" | "approved" | "rejected" | |
notesrequired | string | null | |
positionrequired | integer (-9007199254740991–9007199254740991) | |
contentRatingrequired | "general" | "mature" | "explicit" | |
createdAtrequired | string | ISO 8601 timestamp (UTC) |
updatedAtrequired | string | ISO 8601 timestamp (UTC) |
viewerrequired | object |
curl -X POST 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/examples' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'Get one example
GET/api/v1/prompts/{owner}/{slug}/examples/{id}Token optional
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
id pathrequired | string | Example id |
Responses: 200 OK400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
versionNumberrequired | integer (-9007199254740991–9007199254740991) | |
modelrequired | object | null | |
variablesrequired | object | |
outputTextrequired | string | |
mediaIdsrequired | string[] | |
authorrequired | object | |
approvalrequired | "pending" | "approved" | "rejected" | |
notesrequired | string | null | |
positionrequired | integer (-9007199254740991–9007199254740991) | |
contentRatingrequired | "general" | "mature" | "explicit" | |
createdAtrequired | string | ISO 8601 timestamp (UTC) |
updatedAtrequired | string | ISO 8601 timestamp (UTC) |
viewerrequired | object |
curl 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/examples/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Edit your example
PATCH/api/v1/prompts/{owner}/{slug}/examples/{id}Token required · scope write
Editing an approved example on someone else's prompt sends it back for approval.
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
id pathrequired | string | Example id |
Request body
| Name | Type | Description |
|---|---|---|
model | string | null | |
variables | object | |
outputText | string | |
mediaIds | string[] | |
notes | string | null | |
contentRating | "general" | "mature" |
Responses: 200 OK400, 401, 403, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
idrequired | string | |
versionNumberrequired | integer (-9007199254740991–9007199254740991) | |
modelrequired | object | null | |
variablesrequired | object | |
outputTextrequired | string | |
mediaIdsrequired | string[] | |
authorrequired | object | |
approvalrequired | "pending" | "approved" | "rejected" | |
notesrequired | string | null | |
positionrequired | integer (-9007199254740991–9007199254740991) | |
contentRatingrequired | "general" | "mature" | "explicit" | |
createdAtrequired | string | ISO 8601 timestamp (UTC) |
updatedAtrequired | string | ISO 8601 timestamp (UTC) |
viewerrequired | object |
curl -X PATCH 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/examples/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{}'Delete an example (author, prompt owner or admin)
DELETE/api/v1/prompts/{owner}/{slug}/examples/{id}Token required · scope write
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
id pathrequired | string | Example id |
Responses: 204 OK400, 401, 403, 404, 429
curl -X DELETE 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/examples/{id}' \
-H "Authorization: Bearer $INCANTORY_TOKEN"Set the order of approved examples (prompt owner or admin)
POST/api/v1/prompts/{owner}/{slug}/examples/reorderToken required · scope write
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
Request body
| Name | Type | Description |
|---|---|---|
idsrequired | string[] |
Responses: 200 OK400, 401, 403, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
updatedrequired | integer (-9007199254740991–9007199254740991) |
curl -X POST 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/examples/reorder' \
-H "Authorization: Bearer $INCANTORY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"ids":["ids"]}'