#API Docs Error: "List endpoints for a model"

5 messages · Page 1 of 1 (latest)

tropic token
#

https://openrouter.ai/api/v1/models/:author/:slug/endpoints
The listed fields in the response for this api endpoint are incorrect.
See photo of docs vs. actual call to the endpoint:

        "pricing": {
          "prompt": "0.0000002",
          "completion": "0.0000008",
          "request": "0",
          "image": "0",
          "image_output": "0",
          "web_search": "0",
          "internal_reasoning": "0",
          "discount": 0
        },

Docs reference: https://openrouter.ai/docs/api-reference/list-endpoints-for-a-model

tropic token
#

Another error in the same page:
"status" is listed as a "string or null", but is a number, in this example, 0

tropic token
#

Um yeah there are actually a ton of errors in their spec, do not rely on the OpenRouter documentation, just query the endpoint and figure it out.

Seriously irritating. Please either update the docs or remove them, as they are misleading, I've lost hours tracking down different fields while writing an internal SDK for Rust.

tropic gazelle
#

yeah they should fix it. but there should be plenty of parsers available on github you could browse to help build yours

#

openrouter has to keep pace with the rapidly evolving ai field, and docs aren't always updated immediately. for instance audio/image_output pricing was added recently