# OpenRouter API

> Model catalogue, per-provider prices and the providers page from openrouter.ai public pages.

Category: Developer & Tech. Region: Global. 3 endpoints at `https://api.hoshime.com/v1/openrouter/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/openrouter
## GET /v1/openrouter/models

The models on OpenRouter's catalogue page, newest first, with context length, per-token prices and whether each is free.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Keep models whose id or name contains this text, in any case. |
| `free` | string | no | true keeps the free models, false the paid ones. Omit for both. (one of true, false) |
| `limit` | integer | no | Items per page, 1 to 100. (default 25; e.g. 5) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (string), `completionPrice` (string), `contextLength` (integer (int64)), `createdAt` (string), `description` (string), `free` (boolean), `id` (string), `inputModalities` (string[]), `name` (string), `outputModalities` (string[]), `promptPrice` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/openrouter/models?limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openrouter/modelEndpoints

The providers that serve one OpenRouter model, with their prices, context length, quantization and supported parameters.

Scope: `social:read` · Units: 1 · Cached: 30 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Model slug such as openai/gpt-4o, or its openrouter.ai URL. (e.g. openai/gpt-4o) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `endpoints` (ModelProvider[]), `endpoints[].completionPrice` (string), `endpoints[].contextLength` (integer (int64)), `endpoints[].maxCompletionTokens` (integer (int64)), `endpoints[].name` (string), `endpoints[].promptPrice` (string), `endpoints[].providerName` (string), `endpoints[].providerSlug` (string), `endpoints[].quantization` (string), `endpoints[].supportedParameters` (string[]), `endpoints[].variant` (string), `id` (string), `name` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/openrouter/modelEndpoints?id=openai%2Fgpt-4o" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openrouter/providers

The companies and hosts that serve OpenRouter models, with model counts, headquarters, regions and policy links.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 200. (default 50; e.g. 5) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `headquarters` (string), `modelCount` (integer (int64)), `name` (string), `privacyPolicyUrl` (string), `regions` (string[]), `retainsPrompts` (boolean), `slug` (string), `termsOfServiceUrl` (string), `trains` (boolean), `url` (string)

```bash
curl "https://api.hoshime.com/v1/openrouter/providers?limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
