Core AI API Client

A live example of how to connect to our V1 API.

Live API Tester

Waiting for request...

How to Connect

// Define the API endpoint and your credentials const apiUrl = 'https://coreai2.com/api/v1/connect/'; const apiKey = 'YOUR_SECRET_API_KEY'; // <-- Replace this // Use an async function to handle the fetch request async function queryCoreApi(message) { try { const response = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}` }, body: JSON.stringify({ message }) }); if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); } const data = await response.json(); console.log('API Success:', data); } catch (error) { console.error('API Error:', error); } } queryCoreApi('Hello, world!');