@outputai/http package gives you an HTTP client that automatically shows up in your traces. Every request — URL, method, status code, timing — is recorded as a child node in the trace tree, so you can see exactly what API calls your steps made and how long they took.
Under the hood, it wraps ky, a lightweight HTTP client built on fetch.
Creating a Client
The typical pattern is to create a client per external service in your clients directory, then import it in your steps:clients/jina.ts
HTTP Methods
Using in Steps
Wrap HTTP calls in steps for automatic retry and tracing:steps.ts
Tracing
All requests made with@outputai/http are automatically traced — no configuration needed. In your trace files, HTTP calls appear as children of the step that made them:
Error Handling
The client throwsHTTPError for non-2xx responses and TimeoutError for timeouts:
Environment Variables
| Variable | Description |
|---|---|
OUTPUT_TRACE_HTTP_VERBOSE | Set to true or 1 to include request/response headers and bodies in trace files (otherwise only method, URL, and status are recorded) |