import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
openrouter: {
type: "app",
app: "openrouter",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://openrouter.ai/api/v1/parameters/openai/o1`,
headers: {
Authorization: `Bearer ${this.openrouter.$auth.api_key}`,
},
params: {
provider: `OpenAI`,
},
})
},
})
Returns a list of models available through the API. See the documentation
Send a chat completion request to a selected model. See the documentation
Send a completion request to a selected model (text-only format) See the documentation
OpenRouter uses API keys for authentication. When you connect your OpenRouter account, Pipedream securely stores the keys so you can easily authenticate to OpenRouter APIs in both code and no-code steps.