Skip to content
Go Back

API & SDK Basics

Integrate Consultaion debates into your own applications.

Base URL

https://api.consultaion.com

Local development: set NEXT_PUBLIC_API_URL in .env.local

Authentication

The API currently uses cookie-based session authentication. Ensure you are logged in or include credentials in your requests.

Core Endpoints

POST/debates

Create a new debate session.

GET/debates/{id}

Retrieve debate results and history.

Example Request

const res = await fetch("https://api.consultaion.com/debates", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  credentials: "include",
  body: JSON.stringify({
    question: "How should we roll out AI in 2025?",
    mode: "strategy",
  }),
});

const data = await res.json();
// console.log(data);