Incantory
Sign in

Open in… API

2 operations. Authentication, errors and pagination work as described in the REST API overview.

"Open in" providers and the version's variables

GET/api/v1/prompts/{owner}/{slug}/open-inToken optional

getOpenIn parameters
NameTypeDescription
owner pathrequiredstringOwner handle
slug pathrequiredstringPrompt slug
version queryinteger (…–9007199254740991)

Responses: 200 OK400, 404, 429

Response fields
getOpenIn response fields
NameTypeDescription
versionNumberrequiredinteger (-9007199254740991–9007199254740991)
providersrequiredobject[]
variablesrequiredobject[]
hasVariablesrequiredboolean
Example
curl 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/open-in' \
  -H "Authorization: Bearer $INCANTORY_TOKEN"

Render the prompt and build a provider deep link (counts the click)

POST/api/v1/prompts/{owner}/{slug}/open-inToken optional

Returns {mode:"url", url} or, when the provider has no query support or the URL would exceed 8000 characters, {mode:"copy", openUrl, text} (copy the text, then open the provider). Increments the prompt's open-in count and records an open_in analytics event.

openIn parameters
NameTypeDescription
owner pathrequiredstringOwner handle
slug pathrequiredstringPrompt slug

Request body

openIn body fields
NameTypeDescription
providerrequired"claude" | "chatgpt" | "gemini"
versioninteger (…–9007199254740991)
variablesobject

Responses: 200 OK400, 404, 422, 429

Response fields
openIn response fields
NameTypeDescription
providerrequiredstring
labelrequiredstring
textrequiredstringThe rendered prompt
countrequiredinteger (-9007199254740991–9007199254740991)The prompt's open-in count
moderequired"url" | "copy"
urlstringmode=url
openUrlstringmode=copy
reason"no_query_support" | "too_long"mode=copy
Example
curl -X POST 'https://incantory.ai/api/v1/prompts/{owner}/{slug}/open-in' \
  -H "Authorization: Bearer $INCANTORY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"provider":"claude"}'