OpenRouter API Proxy
Forwards requests to the OpenRouter API through an OpenAI-compatible interface and returns the raw response with parsed token usage and cost. Supports chat completions, messages, responses, embeddings, systemone, model catalogs, providers and generation details.
Aperçu
This App gives any workflow direct access to a wide catalog of AI language, embedding and image models through a single compatible connection. Instead of opening accounts with many separate model providers, you make one call here, choose the model and the operation you want, and receive the model's answer together with the exact usage figures for that call.
It is built for teams that want AI calls to be part of a larger automated flow: a step that generates text, produces embeddings for search, or checks which models are available, and then stores the result alongside the rest of the run's data. Each call returns the complete answer in one result, including the raw model output and, for generative operations, the token counts and charge reported by the model service.
Data notes
Each result corresponds to one call you made. The raw answer is kept exactly as the model service returned it, so you can inspect the full content rather than a shortened summary. For generative operations, the token counts and charge are read from the same answer; for catalog lookups these figures are zero because no generation took place.
Catalog lookups such as the list of available models, model counts, providers and zero-data-retention options work without any credential. Generative and account operations need a credential supplied with that call; it is kept out of logs and the run view. The HTTP status and success flag together tell you whether a call succeeded: a non-success call still returns a result, with the service's own explanation in the raw answer and the error column.
No result is invented: every row reflects an actual call made during the run. Streaming delivery of tokens as they are produced is not covered — the complete answer arrives as one row.
What the results look like
Each result is one completed call to the model service.
| Result ID | Endpoint | HTTP status | Success | Total tokens | Cost (USD) |
|---|---|---|---|---|---|
| models-1764000000000 | models | 200 | Yes | 0 | 0 |
| chat/completions-1764000001234 | chat/completions | 200 | Yes | 36 | 0.00012 |
| chat/completions-1764000002345 | chat/completions | 429 | No | 0 | 0 |
Other fields include the raw response body, request ID, prompt and completion token counts, a parse indicator, the error message and the elapsed time.
Use cases
- To generate text with a chosen model, use the "Endpoint" and "Request body (JSON)" fields to send a chat request, then read "Response body" for the answer and "Total tokens" plus "Cost (USD)" to track spend.
- To discover which models are available before choosing one, run a catalog operation and inspect "Response body"; no credential is needed for this, and "Success" confirms the lookup worked.
- To monitor reliability across a batch of calls, compare "HTTP status" and "Error" across results and use "Elapsed (ms)" to spot slow responses.
Entrée
Paramètres requis pour appeler cette App.
- OpenRouter endpoint
endpointFacultatifstring(enum)Which OpenRouter API endpoint to call. Catalog endpoints (models, models/count, providers, embeddings/models, endpoints/zdr, models/endpoints) are public and need no key. Inference endpoints (chat/completions, messages, responses, embeddings, systemone) and account endpoints (generation, models/user) require a key supplied in the api_key field.Valeurs possiblesEx. : chat/completions (Chat completions (OpenAI format)) / messages (Messages (Anthropic format)) / responses (Responses (OpenAI Responses API)) / embeddings (Text embeddings) / systemone (System One (typed decisions)) / generation (Generation details) / models (List available models) / models/count (Model count) … (13 valeurs au total ; recherche possible dans le formulaire « Exécuter maintenant »)Défautmodels - Request body (JSON)
request_bodyFacultatifstringJSON object sent as the POST body for inference endpoints, for example {"messages":[{"role":"user","content":"Hello"}],"temperature":0.7}. Ignored for GET endpoints. Leave empty for catalog endpoints such as models or providers.Défaut - Model ID
modelFacultatifstringOptional model for POST endpoints. Added to the request body as the 'model' field only when the body does not already contain it, for example openrouter/auto or google/gemini-2.5-flash-image. Ignored by GET endpoints.Défaut - API key
api_keyFacultatifstringYour OpenRouter API key for inference and account endpoints. Required for chat/completions, messages, responses, embeddings, systemone, generation and models/user; not needed for public catalog endpoints. Kept out of logs and the run view.Défaut - Model author
model_authorFacultatifstringOnly for the models/endpoints endpoint: the author part of the model slug, for example openai in openai/gpt-4o.Défaut - Model slug
model_slugFacultatifstringOnly for the models/endpoints endpoint: the model part of the slug, for example gpt-4o in openai/gpt-4o.Défaut
Sortie
Structure des champs d'un enregistrement.
- Result ID
idstringUnique identifier of this response record, built from the endpoint and a millisecond timestampExemplemodels-1764000000000 - Endpoint
endpointstringThe OpenRouter endpoint that was calledExemplemodels - HTTP status
http_statusintegerUpstream HTTP status code; 0 means the request failed before a response arrivedExemple200 - Success
successstringtrue when the upstream returned a 2xx status and no transport error, otherwise falseExempletrue
Tarifs
Facturé selon le nombre d'enregistrements renvoyés avec succès. Les exécutions échouées ne sont pas facturées.
Plusieurs événements de facturation se cumulent indépendamment. Voir chaque élément pour les détails. Les exécutions échouées ne sont pas facturées.
Voir les créditsExécuter maintenant
Exécute réellement l'App une fois avec les paramètres saisis, facturée selon les Tarifs.
Intégration
Avec MCP, vous pouvez appeler cette Data App directement depuis des clients IA comme Claude et Cursor.
Déjà connecté à Octoparse Data Hub ? Utilisez-la directement dans le chat
Aucune configuration nécessaire. Copiez cette phrase dans votre IA et complétez-la avec ce que vous voulez faire :
Pas encore connecté ? Configurez-le une fois avec l'une des méthodes ci-dessous, et toutes les Data Apps fonctionneront ensuite.
Config du client
Remplacez YOUR_API_KEY par votre propre API Key. Fonctionne dans n'importe quel client, en CI ou en environnement sans navigateur.Obtenir une API Key →
{
"mcpServers": {
"octoparse_datahub": {
"type": "http",
"url": "https://mcp-v2.octoparse.com",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}Laissez l'IA tout configurer pour vous
Vous ne voulez pas modifier les configs à la main ? Copiez le prompt d'installation et collez-le dans n'importe quel client IA — il effectuera la configuration à sa manière. (Par défaut, il vous guide pour vous connecter et ne vous demande jamais d'envoyer votre API Key dans la conversation.)
Remarques
Périmètre
Forwards one request per run to the public OpenRouter API at openrouter.ai/api/v1. Public catalog endpoints need no credential; inference and account endpoints require an API key supplied per run through the sensitive api_key input. The raw upstream response is returned verbatim; token usage and cost are read from the response when present. No request or response is fabricated.
Non adapté à
- You need a hosted model served directly by this platform — use the platform's own model invocation instead
- You need streaming responses delivered token by token — this App returns the complete response in one record
- You want to avoid external API charges — inference calls are billed by OpenRouter to the configured key
- You need to call a provider other than OpenRouter or a private/local model endpoint
Exécution et annulation
Cette App s'exécute de façon asynchrone et peut être annulée en cours de route ; les résultats renvoyés avant l'annulation sont conservés et facturés normalement.
Gestion des échecs
Via MCP, l'IA lit automatiquement ces consignes ; via l'API ou le SDK, gérez-les dans votre code.
- 1If an inference endpoint is selected without an api_key, the run fails with missing-credentials; supply the key in the sensitive api_key input and retry
- 2If the endpoint value is unknown or the request body is not valid JSON, the run fails with a clear reason; correct the input and retry
- 3If OpenRouter returns a 4xx or 5xx status, the status and raw response are still emitted in the record with success=false — inspect the response body for the upstream error and adjust the request
- 4If the network call fails before a response arrives, http_status is 0 and the error message is recorded; retry the run
FAQ
Comment est-ce facturé ?
Par enregistrement : 0,01 $US / enregistrement ; les exécutions en échec ne sont pas facturées.Voir Tarifs →
Combien une exécution peut-elle collecter ? Y a-t-il des limites ?
Forwards one request per run to the public OpenRouter API at openrouter.ai/api/v1. Public catalog endpoints need no credential; inference and account endpoints require an API key supplied per run through the sensitive api_key input. The raw upstream response is returned verbatim; token usage and cost are read from the response when present. No request or response is fabricated.Voir Remarques →
Puis-je l’utiliser dans un assistant IA ou un agent ?
Oui. Connectez Octoparse Data Hub une fois et vous pourrez appeler chaque Data App par son nom dans le chat, y compris bzy/openrouter-proxy.Voir Intégration →