The Athenic AI API uses API keys to authenticate requests. You can view your API keys in the Athenic AI dashboard.
Projects must be created in the application. This API request will retrieve IDs and names for all projects owned by your team. You can then use any project_id to query that project.
{
"project_id_example": {
"name": "My Project",
"is_owner": true,
"created_at": "Oct 06, 2023"
}
}
import requests
headers={"Authorization": "Bearer <API_KEY>"}
request.get("https://api.app.athenic.com/api/projects", headers=headers)
data = response.json()
curl --request GET \
--url https://api.app.athenic.com/api/projects \
--header 'Authorization: Bearer <API_KEY>'
HttpResponse<String> response = Unirest.get("https://api.app.athenic.com/api/projects")
.header("Authorization", "Bearer <API_KEY>")
.asString();
var request = require("request");
var options = { method: 'GET',
url: 'https://api.app.athenic.com/api/projects',
headers: { 'Authorization': 'Bearer <API_KEY>' },
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.app.athenic.com/api/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer <API_KEY>"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}