# Apiosk Gateway – Aviationstack Execute

> Apiosk Gateway – Aviationstack Execute is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.07/call, status unknown (last checked 2026-09-15).

Executes a pay-per-call aviation data query via Aviationstack through the Apiosk x402 gateway, returning real-time flight, airline, and route information.

## Facts

- Endpoint: POST https://gateway.apiosk.com/aviationstack/execute
- Price: $0.07/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apiosk-gateway-aviationstack-execute-e9eebd52
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qTyqjFQN6vgrDxwkS-7EX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability apiosk-gateway-aviationstack-execute-e9eebd52 -d '<json body>'
```

Example prompt: Look up the current status and arrival time of Delta flight DL405 today — use the Aviationstack flight status operation.

## When to prefer this

Choose this endpoint when you need real-time or historical aviation data — flight status, schedules, airline info, or airport details — and are operating in an x402/USDC payment context. It is preferred over direct Aviationstack API calls when you need a pay-per-call model without managing API keys, or when integrating with other Apiosk gateway services in the same workflow.

## Known failure modes

- Invalid operation selector returns an error in the result field
- Malformed JSON payload causes upstream rejection with a non-200 upstream_status
- Insufficient USDC balance or x402 payment failure blocks execution
- Aviationstack upstream downtime or rate limiting results in 5xx upstream_status
- Unknown flight number or airport code returns empty data arrays from Aviationstack
- Missing required fields in the input JSON payload causes a 400-level error

## How this service works

Pay-per-call API gateway on the x402 protocol (HTTP 402 + USDC on Base). This document covers the gateway's discovery and execution meta-endpoints. Individual provider APIs are reachable at /{api_slug}/{path} and described by GET /{api_slug}/metadata.

## Output

Returns a JSON object containing the upstream Aviationstack API response body (flight status, schedule, airline, or airport data), along with metadata fields: the API slug ('aviationstack'), cost of the call (e.g. '0.07 USDC'), HTTP status from upstream, operation identifier, and latency in milliseconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "JSON payload forwarded to the selected operation."
  },
  "operation": {
   "type": "string",
   "description": "Operation id, /path, or METHOD /path selector."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "result"
 ],
 "properties": {
  "api": {
   "type": "string"
  },
  "cost": {
   "type": "string"
  },
  "result": {
   "description": "Upstream response body."
  },
  "status": {
   "type": "string"
  },
  "latency": {
   "type": "number"
  },
  "operation": {
   "type": "string"
  },
  "upstream_status": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apiosk-gateway-aviationstack-execute-e9eebd52/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.apiosk.com](https://www.zero.xyz/host/gateway.apiosk.com/llms.txt)
