API reference

How routing, credential injection, and passthrough behave — provider by provider

View as Markdown

This reference is generated from the gateway’s OpenAPI specification, and it documents the gateway itself: routing, authentication, and which credentials get injected or stripped. Request and response schemas belong to the upstreams — their own documentation defines those.

How to read it

Every route is a transparent proxy:

  • Build the upstream’s own request — path, query, body — then add your bearer token and leave the upstream’s key out.
  • A 200 and its body are whatever the upstream returned, verbatim. Examples shown here are representative; exact field definitions live in the provider’s docs.

Authentication

All endpoints expect Authorization: Bearer <token>; an unknown token answers 401. Details: Authentication.

$curl -X POST "https://api.nativeport.ai/serper" \
> -H "Authorization: Bearer $TOKEN" \
> -H "Content-Type: application/json" \
> -d '{"q": "apple inc"}'

Base URL

https://api.nativeport.ai

Local development runs against http://localhost:8787.

Common responses

StatusMeaning
401The bearer token is missing, unknown, or revoked. JSON body: { "error": "Unauthorized." }.
402The credit balance is empty. Requests keep answering 402 until credits are added — never a silently degraded response.
404No route matched, or the matched route doesn’t accept that method (an unlisted /serper/<endpoint>, for example).
otherThe upstream’s own status, passed through untouched.

The API Explorer fires real requests: authenticate with a live bearer token, and expect calls to credit-spending upstreams to count against the account’s usage.