// server.ts
import express from "express";
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const app = express();
const lucid = new RaijinLabsLucidAi({
serverURL: process.env.LUCID_API_URL || "https://api.lucid.foundation",
security: { bearerAuth: process.env.LUCID_API_KEY },
});
app.post('/run', async (req, res) => {
const result = await lucid.run.chatCompletions({
body: {
model: process.env.LUCID_MODEL || "openai/gpt-4o",
messages: [{ role: "user", content: req.body.prompt }],
},
});
res.json(result);
});
app.listen(3100);