Wizard API

Integrate AI chat in your product.

Chat API has been deprecated in favor of the 🧙🏻‍♂️ AIKEK Wizard, the new method of delivering AIKEK Universal Agents and Fractal data infra to builders.

Knowledge Ask Json

post

Answer a question using the Fractal knowledge engine.

This endpoint returns a JSON object with answer, sources, and sentiment fields. Sentiment is a domain-agnostic integer in the [1, 10] range, where 1 is very negative and 10 is very positive.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Payload for the JSON-mode knowledge ask endpoint.

Attributes

question: str The user's question to answer. search_mode: Literal["deep", "fast", "ultrafast"] Retrieval depth preset. Controls number of documents fetched.

questionstringRequired

User question

search_modestring · enumOptional

Retrieval depth preset

Default: fastPossible values:
Responses
200

Successful Response

application/json
post
/knowledge/ask
POST /knowledge/ask HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "question": "text",
  "search_mode": "fast"
}
{
  "answer": "text",
  "sources": [
    "text"
  ],
  "sentiment": 1
}

Chat API Costs

Wizard API has a flat fee of 2 credits per request. Learn more about API Credits at API Pricing.

API Usage Examples

Last updated