List Tokens
curl --request GET \
--url https://api.edenai.run/v2/user/custom_token/import requests
url = "https://api.edenai.run/v2/user/custom_token/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.edenai.run/v2/user/custom_token/', 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/v2/user/custom_token/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/v2/user/custom_token/"
req, _ := http.NewRequest("GET", url, nil)
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/v2/user/custom_token/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v2/user/custom_token/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"label": "<string>",
"masked": "<string>",
"revoked": true,
"legacy": true,
"synthesized": true,
"key_prefix": "<string>",
"last4": "<string>",
"token_type": "sandbox_api_token",
"balance": 0,
"active_balance": true,
"expire_time": "2023-11-07T05:31:56Z",
"balance_reset_amount": 0,
"balance_reset_period": "none"
}
]User Management
List Tokens
GET
/
user
/
custom_token
/
List Tokens
curl --request GET \
--url https://api.edenai.run/v2/user/custom_token/import requests
url = "https://api.edenai.run/v2/user/custom_token/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.edenai.run/v2/user/custom_token/', 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/v2/user/custom_token/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/v2/user/custom_token/"
req, _ := http.NewRequest("GET", url, nil)
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/v2/user/custom_token/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v2/user/custom_token/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "<string>",
"label": "<string>",
"masked": "<string>",
"revoked": true,
"legacy": true,
"synthesized": true,
"key_prefix": "<string>",
"last4": "<string>",
"token_type": "sandbox_api_token",
"balance": 0,
"active_balance": true,
"expire_time": "2023-11-07T05:31:56Z",
"balance_reset_amount": 0,
"balance_reset_period": "none"
}
]Response
200 - application/json
The token name
Maximum string length:
200Non-secret display value, e.g. sk-eden-live…c5d6. Owns the
legacy-JWT vs hash-row duality so every surface (API, admin, shell) masks
the same way. Falls back to the last 4 of a legacy row's stored token.
Maximum string length:
32Maximum string length:
4sandbox_api_token- Sandboxapi_token- Back
Available options:
sandbox_api_token, api_token Optional remaining credits balance for this Token, if active_balance is set to True and the balance reaches 0, this token will become unusable
Required range:
-100000 < x < 100000Weither to use the balance field or not.
The amount this token's balance is reset to at the start of each balance_reset_period. Null when balance_reset_period is 'none'.
Required range:
-100000 < x < 100000How often this token's balance is reinitialized to balance_reset_amount. 'none' = one-time balance (default, current behaviour).
none- Nonedaily- Dailyweekly- Weeklymonthly- Monthly
Available options:
none, daily, weekly, monthly