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
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
version query | integer (…–9007199254740991) |
Responses: 200 OK400, 404, 429
Response fields
| Name | Type | Description |
|---|---|---|
versionNumberrequired | integer (-9007199254740991–9007199254740991) | |
providersrequired | object[] | |
variablesrequired | object[] | |
hasVariablesrequired | boolean |
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.
| Name | Type | Description |
|---|---|---|
owner pathrequired | string | Owner handle |
slug pathrequired | string | Prompt slug |
Request body
| Name | Type | Description |
|---|---|---|
providerrequired | "claude" | "chatgpt" | "gemini" | |
version | integer (…–9007199254740991) | |
variables | object |
Responses: 200 OK400, 404, 422, 429
Response fields
| Name | Type | Description |
|---|---|---|
providerrequired | string | |
labelrequired | string | |
textrequired | string | The rendered prompt |
countrequired | integer (-9007199254740991–9007199254740991) | The prompt's open-in count |
moderequired | "url" | "copy" | |
url | string | mode=url |
openUrl | string | mode=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"}'