curl --request GET \
--url https://api.edenai.run/v3/manage/keys/{key_id}/import requests
url = "https://api.edenai.run/v3/manage/keys/{key_id}/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.edenai.run/v3/manage/keys/{key_id}/', 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/keys/{key_id}/",
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/v3/manage/keys/{key_id}/"
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/v3/manage/keys/{key_id}/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/keys/{key_id}/")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member": "jsmith@example.com",
"masked": "<string>",
"balance": "<string>",
"revoked": true,
"token_type": "sandbox_api_token",
"active_balance": true,
"expire_time": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}Get managekeys
GET (read), PATCH (write, policy fields + rename), DELETE (write, IRREVERSIBLE revoke)
for one key at /v3/manage/keys/{key_id}, org-scoped: a key_id not in the calling key’s org
is a 404, not another org’s key. DELETE destroys the secret and keeps the row marked revoked (see
destroy); there is no re-enable. Balance is pending-adjusted. Never returns the secret or its hash.
curl --request GET \
--url https://api.edenai.run/v3/manage/keys/{key_id}/import requests
url = "https://api.edenai.run/v3/manage/keys/{key_id}/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.edenai.run/v3/manage/keys/{key_id}/', 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/keys/{key_id}/",
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/v3/manage/keys/{key_id}/"
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/v3/manage/keys/{key_id}/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/keys/{key_id}/")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member": "jsmith@example.com",
"masked": "<string>",
"balance": "<string>",
"revoked": true,
"token_type": "sandbox_api_token",
"active_balance": true,
"expire_time": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}Path Parameters
Response
An org's inference key as the management plane exposes it. Never the secret or
its hash — only non-secret metadata, addressed by the stable key_id (id).
balance is the pending-adjusted LIVE sub-limit, not the raw settled column.
For a credit-ledger-enrolled org the stored Token.balance lags by whatever the
batched rollup has not settled, so a management admin must be shown available, not
settled (the shipped display-vs-accounting doctrine, mirrored from
utils/check_credits.py and manage_user_account_serializers). The un-settled
deltas (≤ 0, so they ADD) are batch-fetched once per page by the view and passed in
context["pending"]; a non-ledger org simply has none, so the add is a no-op.
id is null for an un-migrated legacy key (one still stored as a JWT, no
key_id yet); such a key is listed but not addressable via /keys/{id} until
it is regenerated onto the hashed scheme.
The token name
200sandbox_api_token- Sandboxapi_token- Back
sandbox_api_token, api_token Weither to use the balance field or not.