curl --request GET \
--url https://api.edenai.run/v3/manage/usage/requests/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.edenai.run/v3/manage/usage/requests/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.edenai.run/v3/manage/usage/requests/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.edenai.run/v3/manage/usage/requests/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.edenai.run/v3/manage/usage/requests/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.edenai.run/v3/manage/usage/requests/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/usage/requests/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"org_id": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_email": "jsmith@example.com",
"user_former": true,
"custom_token_id": 123,
"custom_token_name": "<string>",
"custom_token_masked": "<string>",
"custom_token_revoked": true,
"custom_token_expired": true,
"call_type": "<string>",
"url": "<string>",
"method": "<string>",
"api_version": "<string>",
"feature": "<string>",
"subfeature": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_code": 123,
"error_kind": "<string>",
"error_message": "<string>",
"providers": [
"<string>"
],
"attempt_count": 123,
"is_streaming": true,
"is_cached": true,
"requested_model": "<string>",
"routing_strategy": "<string>",
"routing_mode": "<string>",
"cost": 123,
"latency_ns": 123,
"tags": {}
}
],
"limit": 123,
"offset": 123,
"total_count": 123,
"next": "<string>",
"previous": "<string>"
}List requests
Returns the organization’s requests one by one, newest first by default: when, which member and API key, the feature, the providers tried, the outcome and what it cost. Filter with feature, subfeature, provider, api_key (key ids; 0 for the members’ personal keys), user (member ids), outcome, streaming, search and tag.<key>=value (or exclude_tag.<key>). A filter takes several values separated by commas. begin/end are ISO timestamps; the window defaults to the last 7 days and may not exceed 366 days. Page with limit (up to 200) and offset (up to 10,000; past it, narrow begin/end). Requires the manage:read scope.
curl --request GET \
--url https://api.edenai.run/v3/manage/usage/requests/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.edenai.run/v3/manage/usage/requests/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.edenai.run/v3/manage/usage/requests/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.edenai.run/v3/manage/usage/requests/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.edenai.run/v3/manage/usage/requests/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.edenai.run/v3/manage/usage/requests/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/usage/requests/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"org_id": 123,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_email": "jsmith@example.com",
"user_former": true,
"custom_token_id": 123,
"custom_token_name": "<string>",
"custom_token_masked": "<string>",
"custom_token_revoked": true,
"custom_token_expired": true,
"call_type": "<string>",
"url": "<string>",
"method": "<string>",
"api_version": "<string>",
"feature": "<string>",
"subfeature": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_code": 123,
"error_kind": "<string>",
"error_message": "<string>",
"providers": [
"<string>"
],
"attempt_count": 123,
"is_streaming": true,
"is_cached": true,
"requested_model": "<string>",
"routing_strategy": "<string>",
"routing_mode": "<string>",
"cost": 123,
"latency_ns": 123,
"tags": {}
}
],
"limit": 123,
"offset": 123,
"total_count": 123,
"next": "<string>",
"previous": "<string>"
}Authorizations
A management key (created from the organization dashboard or with POST /v3/manage/auth-keys), sent as Authorization: Bearer <management_key>. Inference API keys (sk-eden...) are not accepted on these endpoints.
Query Parameters
1 <= x <= 2000 <= x <= 10000newest- newestoldest- oldest
newest, oldest 1any- anysuccess- successerror- errorprovider_fault- provider_faultcaller_fault- caller_faultrate_limit- rate_limit
any, success, error, provider_fault, caller_fault, rate_limit 1