Monster API Integration Bearbeitetes Bild
Monster API Integration Bearbeitetes Bild const config = { method: 'post', url: 'https://api.monsterapi.ai/apis/add-task', headers: { 'x-api-key': xApiKey, Authorization: `Bearer ${bearerToken}`, 'Content-Type': 'application/json', }, data: data, }; try { const response = await axios(config); console.log(JSON.stringify(response.data)); } catch (error) { console.log(error); } } async function fetchRequestStatus(processId) { const data = JSON.stringify({ process_id: processId, }); const config = { method: 'post', url: 'https://api.monsterapi.ai/apis/task-status', headers: { 'x-api-key': xApiKey, Authorization: `Bearer ${bearerToken}`, 'Content-Type': 'application/json', }, data: data, }; try { const response = await axios(config); console.log(JSON.stringify(response.data)); } catch (error) { console.log(error); } } // Beispielaufruf der Funktionen // sendRequest(); // fetchRequestStatus('YOUR_PROCESS_ID');