Back to Mastra

LucidQuery AI | Models

docs/src/content/en/models/providers/lucidquery.mdx

2025-12-182.4 KB
Original Source

LucidQuery AI

Access 2 LucidQuery AI models through Mastra's model router. Authentication is handled automatically using the LUCIDQUERY_API_KEY environment variable.

Learn more in the LucidQuery AI documentation.

bash
LUCIDQUERY_API_KEY=your-api-key
typescript
import { Agent } from "@mastra/core/agent";

const agent = new Agent({
  id: "my-agent",
  name: "My Agent",
  instructions: "You are a helpful assistant",
  model: "lucidquery/lucidnova-rf1-100b"
});

// Generate a response
const response = await agent.generate("Hello!");

// Stream a response
const stream = await agent.stream("Tell me a story");
for await (const chunk of stream) {
  console.log(chunk);
}

:::info

Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the LucidQuery AI documentation for details.

:::

Models

<ProviderModelsTable models={[ { "model": "lucidquery/lucidnova-rf1-100b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 120000, "maxOutput": 8000, "inputCost": 2, "outputCost": 5 }, { "model": "lucidquery/lucidquery-nexus-coder", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 250000, "maxOutput": 60000, "inputCost": 2, "outputCost": 5 } ]} />

Advanced configuration

Custom headers

typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://lucidquery.com/api/v1",
    id: "lucidquery/lucidnova-rf1-100b",
    apiKey: process.env.LUCIDQUERY_API_KEY,
    headers: {
      "X-Custom-Header": "value"
    }
  }
});

Dynamic model selection

typescript
const agent = new Agent({
  id: "dynamic-agent",
  name: "Dynamic Agent",
  model: ({ requestContext }) => {
    const useAdvanced = requestContext.task === "complex";
    return useAdvanced
      ? "lucidquery/lucidquery-nexus-coder"
      : "lucidquery/lucidnova-rf1-100b";
  }
});