SayIntentions.AI API Documentation

Complete Integration Guide for SAPI and flight.json

Access to the SAPI API is currently in PREVIEW and Free. This may change at some point in the future.

Access to Flight.JSON and SimAPI will remain free and open indefinitely.

Overview

This documentation covers two key integration methods for SayIntentions.AI:

  • SAPI (SayIntentions API): RESTful API for programmatic control of voice communications, weather data, and flight operations
  • flight.json: Real-time flight data file for monitoring current flight status and extracting API credentials

The SayIntentions.AI SAPI provides comprehensive programmatic access to the AI-powered air traffic control simulation system. This API enables flight simulator enthusiasts, developers, and automation tools to integrate with the world's most advanced AI ATC system.

Key Features

  • Voice Communication Control: Make any entity (ATC, Co-Pilot, Cabin Crew) say custom phrases
  • Real-time Weather Data: Access ATIS, METAR, and TAF information
  • Airport Operations: Gate assignment, parking management, and communication frequencies
  • Flight Management: Frequency control, variable setting, and pause functionality
  • Communication History: Access complete flight communication logs
  • Live Data Integration: TFR and VATSIM data access
Important: All communications must remain "family friendly" and "aviation themed". Using this API to create obscene or unrelated communications will result in immediate account termination.

Authentication

SAPI uses API key authentication. Most endpoints require a valid API key, while some public endpoints do not.

Getting Your API Key

There are two ways to obtain your API key:

Method 1: Pilot Portal

  1. Log into your SayIntentions.AI pilot portal
  2. Navigate to your account page
  3. Your API key will be displayed on the main account page

Method 2: flight.json File

  1. Start a flight in SayIntentions.AI
  2. Navigate to the flight.json file location (see flight.json section)
  3. Extract the api_key field from the JSON structure
Recommended: The flight.json method is often more convenient for automation as it provides both the API key and current flight context in a single file.

Authentication Requirements

Endpoints are categorized by their authentication requirements:

  • No Authentication: Public endpoints that don't require an API key
  • API Key Only: Requires valid API key but no active flight session
  • API Key + Session: Requires valid API key AND an active flight session
Note: This API is not available to demo customers. A valid subscription is required.

Base URL

https://apipri.sayintentions.ai/sapi/

All API endpoints are accessed via HTTP GET requests to the base URL followed by the endpoint name.

Communication Endpoints

sayAs API KeySession

Make any entity in the AI living world say a phrase, or simulate pilot communications to entities.

GET https://apipri.sayintentions.ai/sapi/sayAs

Parameters

Parameter Type Required Description
api_key string Required Your API key
channel string Required Communication channel: COM1, COM2, INTERCOM1, INTERCOM2, INTERCOM3, COM1_IN, COM2_IN, INTERCOM1_IN, INTERCOM2_IN, INTERCOM3_IN, ACARS_IN
message string Required Message to be spoken (max 255 characters, 128 for ACARS_IN). Must be URL encoded.
rephrase integer Optional 1 = AI rephrases message naturally, 0 = use exact message (default: 0). Only supported for "_IN" channels.
from string Optional ACARS station ID (for ACARS_IN channel only)
response_code string Optional ACARS response code like 'WU', 'NE' (for ACARS_IN channel only)
message_type string Optional Message type: 'cpdlc' or 'telex' (for ACARS_IN channel only, defaults to 'cpdlc')

Channel Usage

  • COM1/COM2: Send message from pilot to ATC
  • COM1_IN/COM2_IN: Send message from ATC to pilot
  • INTERCOM1/INTERCOM2/INTERCOM3: Send message from pilot to intercom passenger
  • INTERCOM1_IN/INTERCOM2_IN/INTERCOM3_IN: Send message from intercom passenger to pilot
  • ACARS_IN: Send ACARS/CPDLC/Telex message to pilot

Examples

# Make Co-Pilot say "Good morning Captain" (with AI variation)
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=INTERCOM1_IN" 
  --data-urlencode "message=Good morning Captain" 
  --data-urlencode "rephrase=1"

# Make ATC ask for altitude verification
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=COM1_IN" 
  --data-urlencode "message=Verify altitude" 
  --data-urlencode "rephrase=1"

# Pilot tells ATC ready for departure
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=COM1" 
  --data-urlencode "message=Holding Short Runway 20 Ready For Departure"

# Send ACARS message
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=ACARS_IN" 
  --data-urlencode "message=HAPPY BIRTHDAY" 
  --data-urlencode "from=XXYY" 
  --data-urlencode "response_code=NE"
getCommsHistory API Key

Retrieve the complete communication history for the current flight, including both pilot and ATC transmissions.

GET https://apipri.sayintentions.ai/sapi/getCommsHistory

Parameters

Parameter Type Required Description
api_key string Required Your API key

Response

{ "comm_history": [ { "id": 12345, "ident": "KJFK", "copilot": 0, "lat": 40.6413, "lon": -73.7781, "frequency": "121.900", "is_acars": 0, "channel": "COM1", "stamp_zulu": "2024-01-15T14:30:00Z", "station_name": "JFK Ground", "outgoing_message": "JFK Ground, N12345 at gate A1, ready to taxi", "incoming_message": "N12345, taxi to runway 04L via Alpha, Bravo", "atc_url": "https://...", "pilot_url": "https://..." } ], "mission": { "mission_id": 67890, "mission_type": "rescue", "status": "active" } }

Weather & Data Endpoints

getWX API Key

Get current weather information including ATIS, METAR, and TAF data for specified airports.

GET https://apipri.sayintentions.ai/sapi/getWX

Parameters

Parameter Type Required Description
api_key string Required Your API key
icao string Required Airport ICAO code(s). Multiple airports separated by commas (e.g., "KJFK,KLGA")
with_comms integer Optional Include communication frequencies (1 = yes, 0 = no)

Example

curl "https://apipri.sayintentions.ai/sapi/getWX" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "icao=KJFK" 
  --data-urlencode "with_comms=1"

Response

{ "airports": [ { "airport": "KJFK", "atis": "JFK Airport Information Alpha...", "atis_cpdlc": "JFK AIRPORT INFORMATION ALPHA...", "metar": "KJFK 151451Z 28008KT 10SM FEW250 M03/M17 A3014", "taf": "KJFK 151120Z 1512/1618 28008KT P6SM...", "active_runway": "04L", "wind_direction": 280, "wind_speed": 8 } ], "comms": [ { "type": "GROUND", "freq": "121.900", "callsign": "JFK Ground", "airport": "KJFK" } ] }
getTFRs API Key

Get current Temporary Flight Restrictions (TFR) data in GeoJSON format.

GET https://apipri.sayintentions.ai/sapi/getTFRs

Parameters

Parameter Type Required Description
api_key string Required Your API key
getVATSIM API Key

Get current VATSIM network data in GeoJSON format, showing active controllers and pilots.

GET https://apipri.sayintentions.ai/sapi/getVATSIM

Parameters

Parameter Type Required Description
api_key string Required Your API key

Airport Operations

assignGate API KeySession

Request assignment to a specific gate at an airport.

GET https://apipri.sayintentions.ai/sapi/assignGate

Parameters

Parameter Type Required Description
api_key string Required Your API key
gate string Required Requested gate identifier (max 30 characters, alphanumeric only)
airport string Required Airport ICAO code (3-4 characters, alphanumeric)

Example

curl "https://apipri.sayintentions.ai/sapi/assignGate" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "gate=A21" 
  --data-urlencode "airport=KATL"

Response

{ "assigned_gate_name": "A21" }
getParking API KeySession

Get current parking assignment information for the active flight.

GET https://apipri.sayintentions.ai/sapi/getParking

Parameters

Parameter Type Required Description
api_key string Required Your API key

Response

{ "parking": { "id": "12345", "name": "Gate A21", "lat": 33.6407, "lon": -84.4277, "heading": 180 } }
getAirport API KeySession

Get comprehensive airport information including weather and communication frequencies.

GET https://apipri.sayintentions.ai/sapi/getAirport

Parameters

Parameter Type Required Description
api_key string Required Your API key
Note: This endpoint uses the airports from your current flight plan to determine which airport data to return.

Flight Management

setFreq API KeySession

Set radio frequency for COM1 or COM2, either active or standby.

GET https://apipri.sayintentions.ai/sapi/setFreq

Parameters

Parameter Type Required Description
api_key string Required Your API key
freq float Required Frequency in MHz (e.g., 121.900)
com integer Optional Radio number: 1 or 2 (default: 1)
mode string Optional Frequency mode: 'active' or 'standby' (default: 'active')

Example

curl "https://apipri.sayintentions.ai/sapi/setFreq" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "freq=121.900" 
  --data-urlencode "com=1" 
  --data-urlencode "mode=active"
getCurrentFrequencies API Key

Get the current frequency configuration for the active flight.

GET https://apipri.sayintentions.ai/sapi/getCurrentFrequencies

Parameters

Parameter Type Required Description
api_key string Required Your API key
setVar API KeySession

Set flight simulator variables or system parameters.

GET https://apipri.sayintentions.ai/sapi/setVar

Parameters

Parameter Type Required Description
api_key string Required Your API key
var string Required Variable name to set
value string Required Value to assign to the variable
category string Optional Variable category (default: "L")
setPause API KeySession

Pause or unpause the ATC simulation.

GET https://apipri.sayintentions.ai/sapi/setPause

Parameters

Parameter Type Required Description
api_key string Required Your API key
value integer Required Pause state: 1 = pause, 0 = unpause

Example

# Pause the simulation
curl "https://apipri.sayintentions.ai/sapi/setPause" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "value=1"

# Resume the simulation
curl "https://apipri.sayintentions.ai/sapi/setPause" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "value=0"

Virtual Airlines

importVAData API Key

Import virtual airline data to customize AI behavior for crew, dispatchers, copilots, and SkyOps operations. This endpoint allows virtual airlines to provide custom prompts and data that will be used by the AI system to generate more realistic and airline-specific communications.

POST https://apipri.sayintentions.ai/sapi/importVAData

Parameters

Parameter Type Required Description
api_key string Required Your API key
payload JSON string Required JSON payload containing virtual airline data (see structure below)

JSON Payload Structure

The payload must be a JSON string containing the following structure:

Field Type Required Description
va_api_key string Required Virtual airline API key (provided by SayIntentions.AI)
crew_data string Optional Custom crew behavior data and prompts for cabin crew interactions
dispatcher_data string Optional Custom dispatcher behavior data and prompts for flight operations
copilot_data string Optional Custom copilot behavior data and prompts for cockpit interactions
skyops_data string Optional Custom SkyOps mission data and prompts for specialized operations
Note: At least one of the four data fields (crew_data, dispatcher_data, copilot_data, or skyops_data) must be provided in the payload.

Data Field Best Practices

Core Principle: Feed in as much information about the pilot, the virtual airline, and the flight itself to give each AI position full situational awareness. Each role needs different data sets to perform optimally.





crew_data - Best Practices

The cabin crew needs to know about passenger service, safety procedures, and airline culture. Focus on customer-facing interactions and service delivery.

What to Include:
  • Service Standards: Unique greetings, how crew should address passengers, timing quirks, or signature amenities
  • Safety Procedures: Any non-standard or VA-invented safety rules, traditions, or special equipment references
  • Passenger Notes: VIPs, recurring characters, special groups (e.g., sports teams, first-time flyers, “Moo Moo Loyalty” members)
  • Flight Context: Route details that matter to the VA (nickname for the flight, themed service, custom announcements)
  • Airline Culture: Personality, humor, rituals, or brand-specific traditions that shape how the crew communicates
Typical Example:
Virtual Airline: Moo Moo Air Aircraft: Boeing 737-800 “Pasture One” Captain: Steve Johnson (celebrating his 99th flight with Moo Moo Air) First Officer: Anna Lee Route: KMIA (Miami Intl) → KMCO (Orlando Intl) Flight Time: 0h 47m Passengers: 137 onboard Special Notes: This is a charter flight for the Orlando Magic basketball team Moo Moo Air Rules & Traditions: - Moo Points: Every flight earns passengers “Moo Points” — announce today’s double-points promotion for loyalty members. - Dairy-Free Cabin: Moo Moo Air enforces a “no outside dairy products” rule due to past allergy incidents. - Moo Song: Before takeoff, the crew plays the 5-second “Moo Moo Jingle” (mention it so the AI can cue it in announcements). - Captain’s Milestones: On milestone flights (like Captain Johnson’s 99th), passengers are invited to clap on landing and the crew may mention it mid-flight. - Gate Nicknames: Moo Moo Air gates are nicknamed by pasture colors; today’s departure is from the “Blue Pasture” gate (F3) and arrival at the “Green Pasture” gate (D7). - Cabin Humor Policy: Flight attendants are encouraged to make one cow-related pun in the safety briefing (but only one). - Uniform Quirk: Moo Moo Air crews wear striped ties or scarves; captains often joke about the “cow-print” checklist. - Passenger Trivia: During cruise, crew may announce a “Moo Fact of the Day” — today’s is that this VA was founded with 12 pilots in a Discord server.
Tips & Tricks:
  • Be Specific: Include exact seat numbers, passenger counts, and service details
  • Personality Matters: Define your airline's service personality (formal, friendly, luxury, etc.)
  • Safety First: Always include safety-related information and procedures
  • Situational Awareness: Include weather, route, and any special circumstances




dispatcher_data - Best Practices

The dispatcher needs comprehensive operational information to support flight planning, fuel management, and operational decisions. Focus on technical and logistical details.

What to Include:
  • Flight Details: Flight number, origin/destination, filed route, cruise altitude, and STAR/SID assignments
  • Fuel Planning: Fuel load, contingency amounts, alternate requirements, and current fuel prices at departure/destination
  • Gate & Ground Contacts: Arrival gate assignment and direct contacts for ramp, fueling, or operations (with names and numbers)
  • Weather & NOTAMs: Departure and arrival conditions, winds/visibility/ceilings, active runway closures or restrictions
  • Aircraft Status: Any MEL/CDL items, deferred maintenance notes, or equipment limitations relevant to the flight
  • Communications: Captain/crew preferences (e.g., ACARS vs voice), required position reports or check-in procedures
  • Operational Policies: Company-specific requirements such as hourly fuel checks, reporting at defined waypoints, or special handling instructions
  • Passenger Load: Headcount, special categories (VIPs, UMs, charter groups), and required documentation
Typical Example:
Virtual Airline: SkyBird Flight Number: 1847 Callsign: SkyBird 1847 Heavy Route: KORD (Chicago O’Hare) → KDEN (Denver Intl) Filed Route: KORD/28R J94 KUBBS J146 HEC J60 CHE J64 DBL ROCKIES3.KDEN Cruise Altitude: FL370, step climb planned to FL390 after ROCKIES Fuel Planning: - Taxi Fuel: 1,200 lbs - Trip Fuel: 16,200 lbs - Contingency: +10% (1,620 lbs) per company policy - Alternate Fuel: 2,800 lbs (Colorado Springs KCOS) - Final Reserve: 3,200 lbs - Total Uplift: 25,020 lbs - Current Fuel Prices: KORD $4.92/gal, KDEN $5.28/gal, KCOS $5.05/gal Gate & Ground Contacts: - Departure Gate: ORD Terminal 3, Gate K19 - Arrival Gate: DEN Terminal B, Gate B38 - Ramp Supervisor: Tom Wilson – 303-555-0198 - Fuel Coordinator: Lisa Park – 303-555-0234 - Denver Operations Center: ops.den@skybirdva.com Weather & NOTAMs: - KORD (Chicago): Winds 150/12G18, scattered clouds 2500 ft, temp 14°C, altimeter 29.82 - KDEN (Denver): Calm, clear skies, unlimited visibility, temp 7°C, altimeter 30.05 - Enroute Weather: Moderate turbulence forecast between FL300-FL340 east of DBL - NOTAMs: • KDEN RWY 16R/34L closed 1400–1600Z for maintenance • ORD ILS 28C GS out of service until 03/10 1200Z • ROCKIES3 STAR note: expect crossing DBL at FL240 Aircraft Status: - Aircraft Type: A320-214 - Registration: N732SB - MEL 34-21-02: APU bleed valve inoperative (no impact with ground air available at ORD/DEN) - Deferred cabin PA volume imbalance, cabin crew briefed Communications & Policies: - Captain Johnson prefers ACARS for routine updates; SATCOM as backup - Mandatory position reports: KUBBS and DBL - Fuel checks every hour on the hour - SkyBird SOP: cross-check waypoint ETA vs. OFP within ±2 minutes Passenger Load: - Total: 142 - Distribution: 120 adults, 19 children, 3 UMs - Special Services: UM escort at both KORD and KDEN, wheelchair assist x2 - Charter Note: Basketball team staff seated rows 5–12, catering includes post-game meal boxes Company Flavor: - SkyBird tradition: Dispatcher signs off flight plan with a “Blue Skies” note visible on crew tablet
Tips & Tricks:
  • Technical Precision: Use exact frequencies, coordinates, and technical terminology
  • Contact Information: Always include names and phone numbers for ground personnel
  • Operational Context: Include MEL items, NOTAMs, and any operational constraints
  • Company Policies: Reference specific fuel policies, reporting requirements, and procedures




copilot_data - Best Practices

The copilot needs personality traits, operational knowledge, and complete situational awareness. Combine dispatcher information with personality and procedural guidance.

What to Include:
  • Flight Identification: Flight number, callsign, aircraft type/registration
  • Route Data: Filed route, cruise altitude, STAR/SID assignments, alternate routing
  • Fuel & Performance: Fuel load breakdown, reserves, weights and balance
  • Weather: Departure, destination, and enroute conditions that affect workload
  • NOTAMs: Closures, outages, or restrictions that might change the plan
  • Aircraft Status: MEL/CDL items or deferred maintenance
  • Passenger & Cargo: Headcount, special categories (VIPs, UMs, charters), unusual cargo
  • Operational Notes: Company-specific requirements (fuel checks, reports, quirks)
  • Personality Context: FO preferences, habits, traditions, or quirks that color the flight experience
Typical Example:
Virtual Airline: SkyBird Flight Number: 1847 Callsign: SkyBird 1847 Heavy Aircraft: A320-214 (Reg N732SB) Captain: Steve Johnson (99th flight milestone) First Officer: Alex Carter (450 hrs in type, known for trivia jokes on long cruise segments) Route Data: - Origin: KORD (Chicago O’Hare, RWY 28R SID: OBK6) - Destination: KDEN (Denver Intl, STAR: ROCKIES3, planned RWY 35L) - Filed Route: J94 KUBBS J146 DBL ROCKIES3 - Cruise Altitude: FL370 with step climb to FL390 after DBL - Alternate: KCOS (Colorado Springs) Fuel & Performance: - Total Uplift: 25,020 lbs - Taxi Fuel: 1,200 lbs - Trip Fuel: 16,200 lbs - Contingency: +1,620 lbs - Alternate: 2,800 lbs - Final Reserve: 3,200 lbs - ZFW: 128,900 lbs, TOW: 154,000 lbs, LW: 139,800 lbs Weather: - KORD: 150/12G18, SCT025, 14°C, QNH 29.82 - KDEN: Calm, CAVOK, 7°C, QNH 30.05 - Enroute: Light to moderate chop FL300–340 east of DBL - FO Note: Alex Carter doesn’t like surprises — if turbulence is forecast, he’ll mention it to crew early NOTAMs: - KDEN RWY 16R/34L closed 1400–1600Z - ORD ILS 28C glideslope OTS until 03/10 1200Z - ROCKIES3 requires DBL crossing FL240 or above Aircraft Status: - MEL 34-21-02: APU bleed valve inoperative, no operational impact - Cabin PA imbalance deferred, advisory only Passenger & Cargo: - 142 passengers (120 adults, 19 children, 3 UMs) - Cargo: 2,100 lbs mail + basketball team gear - FO Note: Alex Carter usually teases the cabin crew about the “sports charter curse” (joking tradition at SkyBird) Operational Notes: - Hourly fuel checks required - Position reports required over KUBBS and DBL - Captain Johnson prefers ACARS for updates - FO Quirk: Alex likes to keep his logbook meticulously detailed — expect him to read back weights and times verbatim
Tips & Tricks:
  • Personality First: Start with personality traits and communication style
  • Include Everything: Copilot should know all dispatcher information plus cockpit procedures
  • Safety Focus: Emphasize safety culture and willingness to speak up
  • Crew Dynamics: Define how they interact with the captain and other crew members




skyops_data - Best Practices

SkyOps missions require specialized knowledge about mission types, equipment, and emergency procedures. Focus on mission-specific requirements and safety protocols.

What to Include:
  • Mission Identification: Mission type, flight number/callsign, aircraft/registration
  • Tasking Details: Objective of the mission (SAR grid, fire suppression drop zone, supply run)
  • Route & Area of Ops: Departure/destination, loiter zones, search grids, waypoints, altitudes
  • Fuel & Loadout: Fuel planning, mission-specific payloads (water tanks, medical supplies, rescue gear)
  • Weather & Hazards: Conditions affecting the mission (visibility, winds, fire smoke, icing)
  • NOTAMs & Restrictions: Airspace closures, TFRs, altitude blocks, restricted corridors
  • Ground Coordination: ATC or mission command contacts, rescue teams, firefighting coordinators
  • Operational Notes: Company/VA-specific rules (check-in intervals, mission success criteria, reporting style)
  • Mission Flavor: Traditions, culture, or quirks unique to the VA’s mission-oriented style
Typical Example:
Virtual Airline: SkyBird SkyOps Division Mission Number: SAR-22 Callsign: SkyBird Rescue 22 Aircraft: DHC-6 Twin Otter (Reg N498SB) Crew: Capt. Maria Lopez, FO Alex Carter, 2 mission observers Mission Type: - Search and Rescue (SAR) for missing hiker group in Rocky Mountain National Park Tasking Details: - Departure: KBJC (Rocky Mountain Metro) - Arrival: KDEN (Denver Intl, mission debrief base) - Search Grid: Grid 7B, altitude block 9,000–11,500 ft MSL - Special Procedure: Conduct expanding square search pattern, check-in every 15 minutes with mission base Fuel & Loadout: - Uplift: 3,400 lbs Jet-A - Mission Payload: 600 lbs medical kits, 2 SAR team members with gear - Endurance: 4.5 hours with 45-min reserve Weather & Hazards: - Area: Winds W 25–35 kt, vis 4–6 mi in blowing snow, OVC080 - Hazards: Mountain wave turbulence, icing possible above 12,000 ft - KBJC: 280/20G30, SCT020, -5°C - KDEN: 290/12, CLR, -2°C NOTAMs & Restrictions: - TFR active over Estes Park for SAR ops, 8,000–13,000 ft MSL, all other traffic prohibited - KBJC RWY 12/30 closed due to snow removal - Caution: High SAR helo traffic in area Ground Coordination: - Mission Base: Rocky SAR Command 970-555-0444 - Fire/Rescue Liaison: Capt. John Marks (on-ground SAR leader) - ATC: Denver Center coordinating SAR corridor clearance Operational Notes: - Company SOP: Position reports every 15 min + after each grid leg completed - Mission Success: Positive visual identification or full grid sweep required - VA Quirk: SkyOps missions tagged with “Rescue Points” — pilots earn +50 for successful ID Mission Flavor: - SkyBird SkyOps tradition: crew announces a “Rescue Shoutout” on return leg - FO Alex Carter often logs GPS track screenshots for Discord AAR (after-action reports)




Complete Example

# GPT: Complete curl example for importVAData
curl -X POST "https://apipri.sayintentions.ai/sapi/importVAData"   -H "Content-Type: application/x-www-form-urlencoded"   --data-urlencode "api_key=YOUR_API_KEY"   --data-urlencode 'payload={
    "va_api_key": "VA_API_KEY_FROM_SAYINTENTIONS",
    "crew_data": ...",
    "dispatcher_data": "...",
    "copilot_data": "...",
    "skyops_data": "..."
  }'

Individual Field Examples

Updating Only Crew Data
# Update only crew behavior
curl -X POST "https://apipri.sayintentions.ai/sapi/importVAData"   -H "Content-Type: application/x-www-form-urlencoded"   --data-urlencode "api_key=YOUR_API_KEY"   --data-urlencode 'payload={
    "va_api_key": "VA_API_KEY_FROM_SAYINTENTIONS",
    "crew_data": "..."
  }'
Updating Only Copilot Data
# Update only copilot behavior
curl -X POST "https://apipri.sayintentions.ai/sapi/importVAData"   -H "Content-Type: application/x-www-form-urlencoded"   --data-urlencode "api_key=YOUR_API_KEY"   --data-urlencode 'payload={
    "va_api_key": "VA_API_KEY_FROM_SAYINTENTIONS",
    "copilot_data": "..."
  }'
Updating Dispatcher and SkyOps Data
# Update dispatcher and SkyOps data together
curl -X POST "https://apipri.sayintentions.ai/sapi/importVAData"   -H "Content-Type: application/x-www-form-urlencoded"   --data-urlencode "api_key=YOUR_API_KEY"   --data-urlencode 'payload={
    "va_api_key": "VA_API_KEY_FROM_SAYINTENTIONS",
    "dispatcher_data": "...",
    "skyops_data": "..."
  }'

Response

{ "status": "OK" }
Virtual Airline API Key: The va_api_key is different from your regular API key and must be obtained from SayIntentions.AI support. Contact support to register your virtual airline and receive your va_api_key.
Data Persistence: Virtual airline data is stored per user and will be applied to all future flights for that user. Data can be updated at any time by calling this endpoint again with new values.

Error Handling

Common Error Responses

All endpoints return JSON responses. Error responses include an error field with a descriptive message.

Authentication Errors

{ "error": "No api_key provided" } { "error": "The provided API key is invalid." } { "error": "No active flight could be found." }

Validation Errors

{ "error": "Missing required fields" } { "error": "Message too long: 300 characters. Maximum is 255 characters." } { "error": "Invalid channel for sayAs: Must be COM1, COM2, INTERCOM1, INTERCOM2, INTERCOM3, COM1_IN, COM2_IN, INTERCOM1_IN, INTERCOM2_IN, OR INTERCOM3_IN" } { "error": "Invalid airport code: XYZ123" } { "error": "Unknown gate: Z99" }

System Errors

{ "status": "UNKNOWN ERROR" } { "error": "No parking found" }

HTTP Status Codes

  • 200 OK: Request successful
  • 400 Bad Request: Invalid parameters or malformed request
  • 401 Unauthorized: Invalid or missing API key
  • 403 Forbidden: API key valid but insufficient permissions
  • 404 Not Found: Endpoint not found
  • 500 Internal Server Error: Server-side error

Complete Examples

Basic Communication Scenario

# 1. Get weather for departure airport
curl "https://apipri.sayintentions.ai/sapi/getWX" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "icao=KJFK" 
  --data-urlencode "with_comms=1"

# 2. Make co-pilot announce ready for pushback
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=INTERCOM1_IN" 
  --data-urlencode "message=Captain, ready for pushback" 
  --data-urlencode "rephrase=1"

# 3. Set COM1 to ground frequency
curl "https://apipri.sayintentions.ai/sapi/setFreq" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "freq=121.900" 
  --data-urlencode "com=1" 
  --data-urlencode "mode=active"

# 4. Simulate pilot call to ground
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=COM1" 
  --data-urlencode "message=JFK Ground, N12345 at gate A1, ready to taxi"

Gate Assignment Workflow

# 1. Request specific gate assignment
curl "https://apipri.sayintentions.ai/sapi/assignGate" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "gate=A21" 
  --data-urlencode "airport=KATL"

# 2. Get current parking information
curl "https://apipri.sayintentions.ai/sapi/getParking" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY"

# 3. Announce arrival at gate
curl "https://apipri.sayintentions.ai/sapi/sayAs" 
  -G 
  --data-urlencode "api_key=YOUR_API_KEY" 
  --data-urlencode "channel=INTERCOM1" 
  --data-urlencode "message=Ladies and gentlemen, we have arrived at gate A21"

JavaScript Integration Example

// GPT: SAPI JavaScript wrapper class
class SayIntentionsAPI {
    constructor(apiKey) {
        this.apiKey = apiKey;
        this.baseUrl = 'https://apipri.sayintentions.ai/sapi/';
    }

    async makeRequest(endpoint, params = {}) {
        const url = new URL(this.baseUrl + endpoint);
        url.searchParams.append('api_key', this.apiKey);
        
        Object.keys(params).forEach(key => {
            url.searchParams.append(key, params[key]);
        });

        const response = await fetch(url);
        return await response.json();
    }

    async sayAs(channel, message, options = {}) {
        return await this.makeRequest('sayAs', {
            channel,
            message,
            ...options
        });
    }

    async getWeather(icao, withComms = false) {
        return await this.makeRequest('getWX', {
            icao,
            with_comms: withComms ? 1 : 0
        });
    }

    async assignGate(gate, airport) {
        return await this.makeRequest('assignGate', {
            gate,
            airport
        });
    }

    async setFrequency(freq, com = 1, mode = 'active') {
        return await this.makeRequest('setFreq', {
            freq,
            com,
            mode
        });
    }

    async pauseSimulation(pause = true) {
        return await this.makeRequest('setPause', {
            value: pause ? 1 : 0
        });
    }

    async getCommsHistory() {
        return await this.makeRequest('getCommsHistory');
    }

    async getTFRs() {
        return await this.makeRequest('getTFRs');
    }

    async getVATSIM() {
        return await this.makeRequest('getVATSIM');
    }

    async importVAData(vaApiKey, data = {}) {
        const payload = {
            va_api_key: vaApiKey,
            ...data
        };
        
        return await this.makeRequest('importVAData', {
            payload: JSON.stringify(payload)
        });
    }
}

// Usage examples
const sapi = new SayIntentionsAPI('YOUR_API_KEY');

// Make co-pilot announce takeoff
sapi.sayAs('INTERCOM1_IN', 'Ladies and gentlemen, prepare for takeoff', { 
    rephrase: 1 
})
.then(response => {
    console.log('Co-pilot announcement sent:', response);
})
.catch(error => {
    console.error('Error:', error);
});

// Get weather for multiple airports
sapi.getWeather('KJFK,KLGA,KEWR', true)
.then(weather => {
    console.log('Weather data:', weather);
})
.catch(error => {
    console.error('Error:', error);
});

// Request gate assignment
sapi.assignGate('A21', 'KATL')
.then(result => {
    console.log('Gate assigned:', result.assigned_gate_name);
})
.catch(error => {
    console.error('Gate assignment failed:', error);
});

// Set radio frequency
sapi.setFrequency(121.900, 1, 'active')
.then(response => {
    console.log('Frequency set:', response);
})
.catch(error => {
    console.error('Frequency error:', error);
});

// Import virtual airline data
sapi.importVAData('VA_API_KEY_FROM_SAYINTENTIONS', {
    crew_data: 'Premium service standards. Address passengers formally.',
    copilot_data: 'I have a calm, methodical personality. I stay informed about our route KORD-KDEN via J94 KUBBS, fuel load 16,200 lbs, Gate 38 arrival. Ground contacts: Tom Wilson (Ramp), Lisa Park (Fuel). I monitor our 142 PAX including 3 unaccompanied minors.',
    dispatcher_data: 'Flight KORD-KDEN: Route J94 KUBBS J146. Fuel: ORD $4.92/gal, DEN $5.28/gal. Load 16,200+contingency. Gate 38. Contacts: Tom Wilson (Ramp) 303-555-0198, Lisa Park (Fuel) 303-555-0234.',
    skyops_data: 'Medical flights have priority routing.'
})
.then(response => {
    console.log('Virtual airline data imported:', response);
})
.catch(error => {
    console.error('Import failed:', error);
});

Rate Limits & Best Practices

Rate Limiting

Currently, there are no strict rate limits implemented, but customers who abuse the system by sending excessive messages may have their access restricted. As a general guideline:

  • Limit voice generation requests to a few dozen per flight
  • Avoid rapid-fire API calls
  • Cache weather and static data when possible
  • Use appropriate delays between related calls

Best Practices

Message Content

  • Keep messages aviation-themed and family-friendly
  • Use proper aviation phraseology when appropriate
  • Respect the 255-character limit (128 for ACARS)
  • URL-encode all message content

Channel Usage

  • Use appropriate channels for different types of communication
  • COM channels for ATC communications
  • INTERCOM channels for crew/passenger announcements
  • ACARS_IN for datalink messages

Error Handling

  • Always check for error fields in responses
  • Implement retry logic for transient failures
  • Log API responses for debugging
  • Handle network timeouts gracefully

Performance

  • Batch related operations when possible
  • Cache frequently accessed data
  • Use appropriate timeouts for HTTP requests
  • Monitor API response times
Important: Voice generation incurs costs on the SayIntentions.AI side. Please use the sayAs endpoint responsibly and avoid unnecessary voice generation requests.

flight.json Overview

The flight.json file is a real-time data file automatically generated and updated by SayIntentions.AI during active flights. This file contains comprehensive flight information, configuration settings, and API credentials that can be used for monitoring and integration purposes.

Key Uses

  • API Key Extraction: Retrieve your API key for SAPI calls
  • Flight Monitoring: Monitor current flight status, position, and clearances
  • Configuration Access: Access current traffic settings, runway assignments, and flight plan details
  • Real-time Integration: Build applications that respond to flight state changes
Read-Only: The flight.json file is generated and maintained by SayIntentions.AI. It should be treated as read-only data for monitoring and integration purposes.

flight.json File Location

The flight.json file is automatically created in your local AppData directory when SayIntentions.AI is running an active flight.

Windows Location

%LOCALAPPDATA%\SayIntentionsAI\flight.json

Typical Full Path Examples

C:\Users\YourUsername\AppData\Local\SayIntentionsAI\flight.json

Accessing the File

  • Windows Explorer: Type %LOCALAPPDATA%\SayIntentionsAI\ in the address bar
  • Command Line: cd %LOCALAPPDATA%\SayIntentionsAI
  • PowerShell: cd $env:LOCALAPPDATA\SayIntentionsAI
File Availability: The flight.json file is only present during active flights. It is created when a flight begins and may be removed when the flight ends. It is updated every 3 to 30 seconds, depending on the current flight state.

flight.json Structure

The flight.json file contains a top-level flight_details object with all flight-related information.

Basic Structure

{
  "flight_details": {
    "Email": "pilot@example.com",
    "userid": "12345",
    "flight_id": 67890,
    "api_key": "your-api-key-here",
    "hostname": "https://apipri.sayintentions.ai",
    "callsign": "N12345",
    "callsign_icao": "N12345",
    "current_flight": {
      "flight_origin": "KJFK",
      "flight_destination": "KLAX",
      "assigned_gate": "A21",
      "taxi_path": [...],
      "flight_plan_route": "KJFK..KLAX"
    },
    "traffic_enabled": "1",
    "traffic_density": "medium",
    "atis_airports": "KJFK,KLGA,KEWR",
    "current_airport": "KJFK"
  }
}

flight.json Field Reference

Authentication & Identity

Field Type Description Example Value
Email string User's email address "pilot@example.com"
userid string Unique user identifier "12345"
flight_id integer Unique identifier for current flight 67890
api_key string API key for SAPI authentication "abc123def456"

System Configuration

Field Type Description Example Value
hostname string API server hostname "https://apipri.sayintentions.ai"
log_level integer Current logging level 2
sidecar_log_level integer Sidecar application logging level 1
skynet_endpoint string Multiplayer network endpoint "skynet.sayintentions.ai:9000"
enable_skynet integer Multiplayer network enabled (1=yes, 0=no) 0
skynet_group_code string Multiplayer group identifier "GROUP123"

Aircraft & Callsign

Field Type Description Example Value
callsign string Aircraft callsign "N12345"
callsign_icao string ICAO format callsign "N12345"

Flight Plan & Route Information

Field Type Description Example Value
current_flight.flight_origin string Origin airport ICAO code "KJFK"
current_flight.flight_destination string Destination airport ICAO code "KLAX"
current_flight.flight_destination_lat string Destination airport latitude "33.9425"
current_flight.flight_destination_lon string Destination airport longitude "-118.4081"
current_flight.flight_plan_origin_lat string Origin airport latitude "40.6413"
current_flight.flight_plan_origin_lon string Origin airport longitude "-73.7781"
current_flight.flight_plan_route string Filed flight plan route "KJFK DCT HAPIE DCT KLAX"
current_flight.flight_plan_sid string Standard Instrument Departure "CANDR4"
current_flight.flight_plan_star string Standard Terminal Arrival Route "BAYST2"
current_flight.flight_plan_departing_runway string Assigned departure runway "04L"
current_flight.flight_plan_arriving_runway string Assigned arrival runway "25R"
current_flight.destination_arriving_runways string Available arrival runways (comma-separated) "25L,25R,24L,24R"

Ground Operations

Field Type Description Example Value
current_flight.assigned_gate string Assigned gate identifier "A21"
current_flight.assigned_gate_lat string Gate latitude coordinate "40.6413"
current_flight.assigned_gate_lon string Gate longitude coordinate "-73.7781"
current_flight.taxi_path array Taxi route waypoints [{lat: 40.641, lon: -73.778}, ...]
current_flight.taxi_object string Taxi guidance object identifier "taxi_arrow_123"

Clearances & Operations

Field Type Description Example Value
cleared_for_landing string Runway cleared for landing "25R"
cleared_for_takeoff string Runway cleared for takeoff "04L"
distance_to_runway string Distance to assigned runway (nautical miles) "2.5"

Traffic & Environment

Field Type Description Example Value
traffic_enabled string AI traffic enabled (1=yes, 0=no) "1"
traffic_density string Traffic density setting "medium"
traffic_radius string Traffic generation radius (nautical miles) "50"
max_aircraft string Maximum AI aircraft "25"
max_static_aircraft string Maximum static aircraft at airports "15"
ga_traffic string General aviation traffic enabled (1=yes, 0=no) "1"
dispatcher_log_level string Traffic dispatcher logging level "2"

Airport & Weather Information

Field Type Description Example Value
atis_airports string Airports for ATIS updates (comma-separated) "KJFK,KLGA,KEWR"
current_airport string Current airport ICAO code "KJFK"
pattern_direction string Traffic pattern direction (left/right) "left"
runway string Currently assigned runway "04L"

Usage Example

Here's a simple example of reading the flight.json file to extract the API key:

// GPT: Example of reading flight.json to get API key
const fs = require('fs');
const path = require('path');
const os = require('os');

function getFlightData() {
    try {
        // Construct path to flight.json
        const flightJsonPath = path.join(
            os.homedir(), 
            'AppData', 
            'Local', 
            'SayIntentionsAI', 
            'flight.json'
        );
        
        // Read and parse the file
        const flightData = JSON.parse(fs.readFileSync(flightJsonPath, 'utf8'));
        
        return {
            apiKey: flightData.flight_details.api_key,
            flightId: flightData.flight_details.flight_id,
            callsign: flightData.flight_details.callsign,
            origin: flightData.flight_details.current_flight.flight_origin,
            destination: flightData.flight_details.current_flight.flight_destination,
            currentAirport: flightData.flight_details.current_airport
        };
    } catch (error) {
        console.error('Error reading flight.json:', error.message);
        return null;
    }
}

// Usage
const flightInfo = getFlightData();
if (flightInfo) {
    console.log('API Key:', flightInfo.apiKey);
    console.log('Current Flight:', flightInfo.callsign, 
                'from', flightInfo.origin, 'to', flightInfo.destination);
}

SimAPI - Integrate SayIntentions.AI with ANY Flight Simulator

What is SimAPI

SayIntentions.AI uses our custom "SimAPI" implementation as the mechanism for integrating SayIntentions.AI into ANY flight simulation software. Or put another way, SimAPI is used as a custom-built abstraction layer between SayIntentions.AI and any given flight simulator.

Universal Integration: SimAPI allows SayIntentions.AI to work with any flight simulator, regardless of the platform or API structure.

How Does SimAPI Work?

Integration Architecture

SimAPI uses a two-way file-based communication system:

Input Integration

For feeding simulator data into SayIntentions.AI:

  • Developer builds an "adapter" application
  • Collects telemetry and radio-stack data from flight simulator
  • Writes data to a JSON file
  • SayIntentions.AI reads this file every 1-2 seconds
Output Integration (Optional)

For SayIntentions.AI to change simulator variables:

  • SayIntentions.AI writes an "output" file when changes are needed
  • Examples: COM frequency changes, transponder code updates
  • Developer reads this file and updates simulator variables
  • Enables features like Auto-Tune functionality

Development Guide

Development Timeline

Quick Development: For a developer already familiar with a simulator's API, building a complete input AND output adapter should take less than a day of work.

Programming Language Requirements

Language Agnostic: We support any programming language, as long as the adapter can read and write JSON files from the local file system.

System Requirements

Operating System Support

  • Windows 10
  • Windows 11
No other operating systems are currently supported.

Network Requirements

The adapter needs to be able to read and write to the file-system of whatever computer the SayIntentions.AI application is running on. However, these read and write operations could be done over a network connection.

File Specifications

Input File (Telemetry Data)

File Path: %localappdata%\SayIntentionsAI\simAPI_input.json

Update Frequency: Every 0.75 to 1 second is more than enough.

Output File (Variable Change Requests)

File Path: %localappdata%\SayIntentionsAI\simAPI_output.jsonl

Read Frequency: Every 0.75 to 1 second is sufficient. After reading, delete the file or clear its contents.

Required Input File Fields

In addition to the simvars listed in the specification, the input JSON requires five additional fields:

Field Type Purpose Example
name String Plain-text name of your simulator "SuperFunSim", "MobiSimNow"
version String Version of the simulator itself "2.1.4", "1.0.3"
adapter_version String Version of your adapter "1.0.0", "2.3.1"
simapi_version String SimAPI version your code targets "1.0", "2.0"
exe String Windows executable name of simulator "mysim.exe", "flightsim.exe"

Output File Format

The output file uses JSONL format (one JSON object per line). Each line represents a variable change request:

Sample Output Line:
{"setvar": "COM_STBY_RADIO_SET_HZ", "value": "127950000"}

In this example, you should set the COM1 standby radio to 127.95 MHz.

Variables & Examples

Variable Specifications

Input Variables

Input simvar names are taken from MSFS 2020/2024. Complete list with purpose and data types:

View Input Variables
Output Variables

Output simvar names are taken from MSFS 2020/2024 K-Vars. Complete list with purpose and data types:

View Output Variables

Sample Files

Sample Input File

Example of simAPI_input.json structure:

Download Sample Input
Sample Output File

Example of simAPI_output.jsonl structure:

Download Sample Output

SimAPI Limitations

Unsupported Features

The following features are NOT available to simulators that integrate with SayIntentions.AI using the SimAPI adapter:

3D Object Injection Limitations: SimAPI cannot inject 3D objects into simulators, which affects several features.
Ground Operations
  • Pushback control
  • Ramp control
Traffic Systems
  • Traffic injection
  • Traffic awareness
Visual Elements
  • Lighted taxi paths
  • Mission scene objects

SkyOps Mission Limitations

Partial Support: Most SkyOps mission types are supported, but visual elements are not available.
Limited Mission Types

Rescue & Fire Missions: These missions will function but without visual elements:

  • No smoke signals
  • No incident scene objects
  • No flares or fires
Fully Supported

All Other Mission Types: These work completely with SimAPI:

  • Cargo missions
  • Passenger transport
  • Training missions
  • Custom scenarios
Reference Documentation: For complete SimAPI integration details, visit the official SimAPI Developer HowTo guide

Support & Resources

Getting Help

If you need assistance with the SAPI:

  • Check this documentation first
  • Review the examples and error messages
  • Contact SayIntentions.AI support through the pilot portal
  • Join the community forums for developer discussions

Additional Resources

Documentation Version: This documentation was generated from the SAPI implementation and reflects the current API capabilities. Last updated: