From key to completion.
Make your first MindLarp request with cURL or the OpenAI JavaScript SDK.
1. Create an API key
Open the API keys page, name your key, choose an expiration, and create it. Copy the secret immediately; it will not be shown again.
2. Configure your environment
export MINDLARP_API_KEY="ml_sk_live_your_secret"Never expose a secret key in browser code or commit it to source control.
3. Send a request
curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $MINDLARP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MindLarp-Sol-1-Plus",
"messages": [
{"role": "user", "content": "Give one clear idea for a morning routine."}
]
}'For a deployed API, replace the local origin with your public HTTPS endpoint.
Using JavaScript
Install the OpenAI SDK in your application with npm install openai, then point it at your MindLarp endpoint.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.MINDLARP_API_KEY,
baseURL: "http://localhost:3000/v1",
});
const completion = await client.chat.completions.create({
model: "MindLarp-Sol-1-Plus",
messages: [{ role: "user", content: "Make this idea clearer." }],
});
console.log(completion.choices[0].message.content);What next?
Review the API reference for streaming and tool calling, or inspect requests in the usage console.
