Last updated 3 months ago
const response = await fetch('https://api.aimlapi.com/threads/{threadId}/runs', { method: 'GET', headers: {}, }); const data = await response.json();
const response = await fetch('https://api.aimlapi.com/threads/{threadId}/runs/{runId}', { method: 'GET', headers: {}, }); const data = await response.json();
const response = await fetch('https://api.aimlapi.com/threads/{threadId}/runs/{runId}', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({}), }); const data = await response.json();
const response = await fetch('https://api.aimlapi.com/threads/{threadId}/runs', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "assistant_id": "text" }), }); const data = await response.json();