---
title: "Ask Spark a question about your content, optionally grounded in a web page"
method: POST
path: "/spark/ask"
tags: ["Spark"]
---

# Ask Spark a question about your content, optionally grounded in a web page

`POST /spark/ask`

## Request

- Base URL: `https://developer.solofire.com/v1`
- URL: `https://developer.solofire.com/v1/spark/ask`
- Auth: HTTP bearer

Requires the `content.read` scope.

## Request body

- object
  - `question` string, required: The question, in plain language. Up to 4000 characters.
  - `configuration_id` string: Answer from this configuration only, applying its Spark rules. The configuration must have AI chat enabled. Omit to search everything the credential can read.
  - `page` object: A web page to ground the answer in, as {url, title, text}. Text beyond 20,000 characters is truncated. Use it when the question is about the page the user is looking at.
  - `history` unknown[]: Earlier turns of this conversation, oldest first, as {role: "user" | "assistant", content}. The last 12 are used. Nothing is stored server-side.
    - unknown

## Response `201`

Created

- object

## Other responses

- `401`: `unauthorized` No credential was presented. `invalid_token` The API key is unknown, revoked or malformed. `token_expired` The API key has passed its expiry.
- `403`: `insufficient_scope` The credential does not carry the required scope. `forbidden` The member this credential acts as lacks the permission. `feature_not_enabled` API access is not enabled for this company.
- `405`: `method_not_allowed` The path exists but not for this method.
- `413`: `payload_too_large` The request body is too large.
- `422`: `validation_failed` A parameter or body field is invalid.
- `429`: `rate_limited` The credential is over its request budget.
- `500`: `internal_error` Something went wrong on our side.

---

[API](https://skmtc.dev/solofire/apis/solofire-api.md) · [All operations](https://skmtc.dev/solofire/apis/solofire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/solofire/apis/solofire-api/revisions/23e387532175?raw)
