---
title: "Stream a flight AI search task's events"
method: GET
path: "/v1/flight_ai_search/tasks/{task_id}/events"
tags: ["Discovery"]
---

# Stream a flight AI search task's events

`GET /v1/flight_ai_search/tasks/{task_id}/events`

## Request

- Base URL: `https://api.gojinko.com`
- URL: `https://api.gojinko.com/v1/flight_ai_search/tasks/{task_id}/events`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

The task's events as Server-Sent Events, from the start or after `Last-Event-ID`. The stream ends when the task ends its turn, or after 45 seconds: reconnect with the `Last-Event-ID` of the last event received.

## Path parameters

- `task_id` string, required

## Headers

- `Last-Event-ID` string: The `id` of the last event received.

## Response `200`

The events.

## Other responses

- `400`: Bad request: an invalid header, such as a reserved `X-End-User-Id` (`user_…`, `org_…`).
- `401`: Authentication required
- `403`: The key is valid but is not a tenant API key (`jnk_t_…`), is not granted the `search_live` scope, or Travel AI search is not enabled for this account. **`FORBIDDEN`** — The credential is valid, and this request is refused anyway. Do not rotate the key — it is working. Check that it is entitled to this operation, and on this environment.
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit or quota exceeded
- `502`: The travel provider rejected the request, or an upstream call failed
- `503`: No travel provider can serve the request right now
- `504`: The travel provider did not answer in time

---

[API](https://skmtc.dev/gojinko/apis/jinko-public-api.md) - [All operations](https://skmtc.dev/gojinko/apis/jinko-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gojinko/apis/jinko-public-api/revisions/ac5046767e4c?raw)
