Skip to main content
POST
Answers a question about aviation operations by researching radio transcripts from channels available to the API, ADS-B aircraft positions, FAA SWIM records (ground stops, flow programs, EDCTs, holds, diversions, airport configuration, surface movements), weather, and the public web. Returns the answer and the records it rests on. Nothing is stored between requests. To ask a follow-up, send the earlier questions and answers again in messages, with the new question last. Earlier answers are used only to understand what the new question refers to; every answer is researched again from the records.
An answer usually takes from several seconds to a few minutes. Keep the connection open until the response arrives. If the connection closes first, research stops and nothing is charged.

Body

JSON, at most 256 KiB.
object[]
required
The conversation, oldest first, 1 to 40 messages. Each is {"role": "user" | "assistant", "content": "..."}. The last message must have role user.
string
default:"text"
text, markdown, or json. markdown quotes transmissions as links of the form [words](audio:<audio_sample_id>).
object
Required with format json; not accepted with other formats. A JSON Schema object describing the answer, e.g. {"type": "object", "properties": {"diverted": {"type": "boolean"}}}. The answer is written to follow it but is not validated against it.
integer
default:"5000"
Most records to review, 300 to 50000. Research stops when it is reached, and the answer says what could not be checked. Lowered to what the organization’s available balance covers.This is also the most records one answer can be charged for. Each record reviewed costs $0.01; for example, an answer that reviews 418 records, like the example response below, costs $4.18.
integer
default:"25"
Most evidence records to return, 0 to 50.

Response

string
The format of the answer.
string
The answer, for formats text and markdown.
any
The answer, for format json.
object
The records the answer rests on, at most evidence_limit in total, most important first within each list. Every record was retrieved while answering.
object
Transmissions, ADS-B positions, and SWIM records reviewed while answering, and their total.
integer
The record limit used, after lowering it to what the organization’s available balance covers.
boolean
Whether research stopped at the record limit.
integer
Records charged: records_reviewed.total, at least 300 and at most record_limit.
Answers are written by a language model from the records it reviewed and can contain mistakes. Check important details against the evidence.

Billing

Each record reviewed is charged as one answer_record, at $0.01. An answer is charged for records_charged records: at least 300 and at most record_limit. See Pricing. The X-Charged-Usd and X-Balance-Usd response headers report the charge and the remaining balance in US dollars with three decimal places. Nothing is charged when an answer fails (502), including when the client disconnects before the response. A request is never deduplicated: retrying it starts a new answer, which is researched and charged again. See Billing.

Errors