Skip to content
Andesine

Ask AI about published content

post

Returns a complete answer with numbered sources. Requires explicit ai-answers permission in addition to content read permissions. Accepts up to 1,000 question characters, 10 history messages of up to 4,000 characters each, and 20 property filters. Uses 10 AI credits and the Ask AI rate limit. Use a secret key on your server, or a publishable key for published content.

Required API key permissions: ai-answers, read:publishing. Write permissions also grant read access for the same resource.

Authentication

apiKeyhttp, bearer, Andesine API key

Use an Andesine API key as a Bearer token

oauthhttp, bearer, Andesine OAuth access token

Use an OAuth access token with andesine:api scope. Send x-workspace-id for workspace operations. Current user permissions apply.

x-workspace-idstring

Required for OAuth: ID of the workspace to access. API keys use their own workspace.

Request body *

application/json
Bodyobject
7 fields
question*string
collectionIDstring
collectionPathstring

Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.

collectionSlugPathstring

Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.

filtersarray of PropertyFilter
Default: []
Options

Any of

TextPropertyFilterobject
kind*constant
Value: "text"
key*string

Property identifier

operatorstring
One of: "any", "all", "none"Default: "any"
values*array of string
NumberPropertyFilterobject
kind*constant
Value: "number"
key*string

Property identifier

operator*ComparisonOperator
One of: "equals", "notEquals", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"
value*number
BooleanPropertyFilterobject
kind*constant
Value: "boolean"
key*string

Property identifier

value*boolean
DatePropertyFilterobject
kind*constant
Value: "date"
key*string

Property identifier

operator*ComparisonOperator
One of: "equals", "notEquals", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"
value*string
historyarray of AnswerHistoryMessage
Default: []
2 fields
role*string
One of: "user", "assistant"
content*string
channel*string

Publishing channel to search

Responses

200OKapplication/json
Bodyobject
2 fields
answer*string
sources*array of PublishedAnswerSource
16 fields
path*string
slugPath*string
anchorstring
entryID*string
collectionIDstring
collectionPath*array of string
headingPath*array of string
title*string
snippet*string
properties*array of SearchPropertyValue
7 fields
key*string
name*string
type*EntryPropertyKind
One of: "text", "number", "checkbox", "date", "url", "select", "multi-select"
textValuearray of string
numberValuenumber
booleanValueboolean
dateValuenumber
updatedAt*string
channel*PublishingChannelCode
versionID*string
snapshotID*string
id*number
relevance*number
400Bad Requestapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "BAD_REQUEST"
status*constant
Value: 400
message*string
Default: "Bad Request"
dataValidationErrorData
2 fields
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

issuesarray of ValidationIssue
3 fields
message*string
codestring
patharray of any of
Options

Any of

Option 1string
Option 2number
Option 3object
key*any of
Options

Any of

Option 1string
Option 2number
Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
401Unauthorizedapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "UNAUTHORIZED"
status*constant
Value: 401
message*string
Default: "Unauthorized"
dataErrorData
1 field
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
403Forbiddenapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "FORBIDDEN"
status*constant
Value: 403
message*string
Default: "Forbidden"
dataForbiddenErrorData
4 fields
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

missingPermissionsarray of string
requiredPlanconstant
Value: "pro"
actionstring

The requested action that was denied

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
404Not Foundapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "NOT_FOUND"
status*constant
Value: 404
message*string
Default: "Not Found"
dataErrorData
1 field
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
409Conflictapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "CONFLICT"
status*constant
Value: 409
message*string
Default: "Conflict"
dataErrorData
1 field
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
429Too Many Requestsapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "TOO_MANY_REQUESTS"
status*constant
Value: 429
message*string
Default: "Too Many Requests"
dataRateLimitErrorData
3 fields
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

limitstring

The limit that was reached: a short-term rate limit, or a monthly API call, AI credit, or spending limit

One of: "rate", "api-calls", "ai-credits", "spending"
retryAfterSecondsnumber

Minimum delay before another attempt, in seconds. Also sent in Retry-After.

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
500Internal Server Errorapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "INTERNAL_SERVER_ERROR"
status*constant
Value: 500
message*string
Default: "Internal Server Error"
dataErrorData
1 field
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
503Service Unavailableapplication/json
Bodyone of
Options

One of

Option 1object
defined*constant
Value: true
code*constant
Value: "SERVICE_UNAVAILABLE"
status*constant
Value: 503
message*string
Default: "Service Unavailable"
dataErrorData
1 field
hintsarray of string

Suggested next steps. Wording can change; use error codes and structured data for program logic.

Option 2object
defined*constant
Value: false
code*string
status*number
message*string
dataany
AndesinePowered byPages