An agent deployed on Blaxel can be consumed through various downstream applications, including web apps and front-end UIs.

Integrate in your application

You’ll need:

Use these code snippets to integrate your agent in your JavaScript, TypeScript or Python applications.

Make sure to not expose your API key publicly.
const response = await fetch("https://run.blaxel.ai/YOUR-WORKSPACE/agents/YOUR-AGENT", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer <YOUR_API_KEY>`
  },
  body: JSON.stringify({
    inputs: "Hello, world!"
  })
});

const data = await response.text();
console.log(data);