Accessing the Raycast backend API delightfully.
npm install raycast-backend-apiAccessing the Raycast backend API delightfully.
``shell`
npm i raycast-backend-api
`ts
import RaycastApi from "raycsat-backend-api";
const api = new RaycastApi();
const me = await api.me();
const models = await api.aiModels();
`
- token: The Bearer token for the authorization header. Defaults to the token in your Raycast config. You can pass in an empty string to omit it from the authorization header.apiEndpoint
- : The API endpoint. Defaults to https://backend.raycast.com/api/v1/.configPath
- : The path to your Raycast config file. Defaults to ~/.config/raycast/config.json.
> [!CAUTION]\
> All APIs are subject to change by Raycast. You should handle errors in your code usage.
Get current user's information.
Returns a Promise.
Get all AI models.
Returns a Promise
MIT