---
title: "Synthesized, cited answer (RAG)"
method: POST
path: "/api/v1/ask"
tags: ["answers"]
---

# Synthesized, cited answer (RAG)

`POST /api/v1/ask`

## Request

- Base URL: `https://horizon.alchemylab.sh`
- URL: `https://horizon.alchemylab.sh/api/v1/ask`
- Auth: HTTP bearer

Ask a natural-language question and get a synthesized answer grounded only in Horizon's recent corpus, with inline [n] citations. One call instead of search-then-read.

## Request body

- object
  - `question` string, required: e.g. 'what did OpenAI ship this week?'
  - `days` integer: How many days back to retrieve over.
  - `limit` integer: Max sources to retrieve.

## Response `200`

Answer with citations.

- object
  - `question` string
  - `answer` string: Prose with inline [n] citation markers.
  - `citations` object[]
    - `n` integer
    - `title` string
    - `url` string, nullable
    - `source` string
    - `publishedAt` string, date-time
  - `retrieved` integer: How many sources were retrieved.
  - `attribution` string

## Other responses

- `400`: Error
- `401`: Error
- `429`: Error
- `503`: Answer synthesis temporarily unavailable.

---

[API](https://skmtc.dev/alchemylab/apis/horizon-api.md) · [All operations](https://skmtc.dev/alchemylab/apis/horizon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/alchemylab/apis/horizon-api/revisions/936cb3804026?raw)
