Connect DieselIQ.
Bring diesel support into your website or app. Keep conversations, truck details, and usage together through one API.
Get startedYour first request.
Use a separately provisioned DieselIQ API key on your server. Send a message with any truck details you already know.
DIESELIQ_API_KEY in your server environment. Integration keys are managed separately from your website sign-in.View a first request
curl https://yazjaphejmcctswuykpw.supabase.co/functions/v1/diesel-api/v1/chat \
-H "Authorization: Bearer $DIESELIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "My tuner will not connect. What should I check?",
"vehicle": {
"year": "2020",
"make": "Ram",
"model": "2500",
"engine": "6.7L Cummins",
"tuner": "EZ LYNK",
"device_model": "AutoAgent 3"
}
}'Keep the key on your server.
Send your key in the Authorization: Bearer header. Your website's browser should call your own backend, which authenticates the visitor and forwards the request to DieselIQ.
Apply your own visitor rate limits and keep API keys out of HTML, browser bundles, and public repositories.
Keep the context together.
Chat responses include answer, conversation_id, vehicle, and usage. Send the returned conversation ID with follow-up messages. Keep each customer's conversation separate, and use the returned vehicle context when updating your UI.
View a conversation example
// Run this on your server. Keep the key out of browser code.
const response = await fetch(
"https://yazjaphejmcctswuykpw.supabase.co/functions/v1/diesel-api/v1/chat",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DIESELIQ_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
message: "What should I check next?",
mode: "quick", // quick, balanced, or thorough.
conversation_id: conversationId, // Omit for a new conversation.
vehicle: { year: "2020", make: "Ram", model: "2500" },
}),
}
);
const result = await response.json();
if (!response.ok) throw new Error(result.error?.message);
// Keep this conversation ID with the same customer session.
console.log(result.answer, result.conversation_id);Useful vehicle fields include year, make, model, engine, tuner, and device_model. Software, firmware, and controller details can help when compatibility depends on an exact setup.
API reference.
- POST
/v1/chatSend a message with optional conversation and vehicle context.
- GET
/v1/usageRead the workspace's token and credit allowance.
- POST
/v1/feedbackReport an outcome with
conversation_id,outcome, andresolution.
Errors use { error: { code, message } }. Handle authentication failures, allowance limits, and temporary service errors in your application.
Usage you can account for.
Integration responses include input and output token usage. Your provisioned integration has its own service limits; handle limit errors before retrying requests.