Quickstart
Make your first API call in under 2 minutes.
1. Create an API key
Go to the API Keys page in the Galadri Console and click Create API Key. Copy the key immediately. It will not be shown again.
2. Create an agent
Go to the Agents page and create a new agent. Give it a name (this becomes the slug you use in API calls), a system prompt, and enable the tools you want it to use.
Start simple
Enable just Google Maps Search and Web Search to test basic functionality. You can add more tools later.
3. Send your first request
Replace gld_your_api_key with your actual key, and my-agent with your agent's slug.
Use a server-side runtime
Call the Galadri API from your backend, serverless function, or other trusted server-side runtime. Do not ship API keys to browsers, mobile apps, or public frontend bundles.
curl -X POST https://api.galadri.com/v1/chat \
-H "Authorization: Bearer gld_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"agent": "my-agent",
"message": "Find oil change shops near Phoenix, AZ",
"end_user_id": "user-123"
}'const response = await fetch("https://api.galadri.com/v1/chat", {
method: "POST",
headers: {
"Authorization": "Bearer gld_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
agent: "my-agent",
message: "Find oil change shops near Phoenix, AZ",
end_user_id: "user-123",
}),
});
// The response is a Server-Sent Events stream
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
const lines = chunk.split("\n");
for (const line of lines) {
if (!line.startsWith("data: ")) continue;
const payload = line.slice(6);
if (payload === "[DONE]") break;
const event = JSON.parse(payload);
if (event.type === "content") {
process.stdout.write(event.content);
}
}
}4. Read the response
If the agent's Streaming capability is enabled, the API returns a streaming response using Server-Sent Events (SSE). You will receive events as they happen: session creation, tool calls, content tokens, and usage.
data: {"type":"session","session_id":"550e8400-e29b-41d4-a716-446655440000","is_new":true}
data: {"type":"tool_call","id":"tc_1","actions":[{"tool":"google-maps-search","args":{"query":"oil change shops near Phoenix, AZ"}}]}
data: {"type":"tool_result","id":"tc_1","results":[{"tool":"google-maps-search","status":"success","data":{...}}]}
data: {"type":"content","content":"I found several oil change shops near Phoenix, AZ:\n\n"}
data: {"type":"content","content":"1. **Valvoline Instant Oil Change** — 4.5★, 2.1 mi away\n"}
data: {"type":"usage","prompt_tokens":1250,"completion_tokens":340,"thinking_tokens":0,"cost_cents":42}
data: [DONE]Non-streaming mode
If you prefer a single JSON response, set "overrides": { "streaming": false } in the request body. Agents with Streaming disabled already use JSON mode by default. See the Chat endpoint reference for the full response shape.
5. Try adding a vehicle
Agents with the manage-data tool can create and manage data for your end users. Try asking the agent to save a vehicle:
curl -X POST https://api.galadri.com/v1/chat \
-H "Authorization: Bearer gld_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"agent": "my-agent",
"message": "Add my 2020 Toyota Camry SE, VIN 4T1BF1FK5LU123456, with 45000 miles",
"end_user_id": "user-123"
}'The agent will use the manage-data tool to create a vehicle record. You will see a data_saved event in the stream with the new record. You can also manage data directly via the REST endpoints.
Next steps
- Authentication — API key management, rate limits, and error codes
- Chat endpoint reference — Full request/response docs, streaming events, sessions
- Data Model — Vehicle, document, milestone, and schedule tables
- Tools reference — All built-in tools and their parameters