/api/v1/api_keys
curl --request GET \
--url https://api.venice.ai/api/v1/api_keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venice.ai/api/v1/api_keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.venice.ai/api/v1/api_keys', 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.venice.ai/api/v1/api_keys",
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.venice.ai/api/v1/api_keys"
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.venice.ai/api/v1/api_keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/api_keys")
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{
"data": [
{
"apiKeyType": "ADMIN",
"consumptionLimits": {
"usd": 50,
"diem": 10,
"vcu": 30
},
"limitPeriod": "MONTH",
"createdAt": "2023-10-01T12:00:00.000Z",
"expiresAt": "2023-10-01T12:00:00.000Z",
"id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
"last6Chars": "2V2jNW",
"lastUsedAt": "2023-10-01T12:00:00.000Z",
"description": "Example API Key",
"usage": {
"trailingSevenDays": {
"usd": "10.2424",
"vcu": "42.2315",
"diem": "4.2231"
}
},
"currentPeriodUsage": {
"usd": "5.1234",
"diem": "2.5000"
}
}
],
"object": "list"
}{
"error": "<string>"
}{
"error": "<string>"
}API Keys
Elenca API key
Return a list of API keys.
GET
/
api_keys
/api/v1/api_keys
curl --request GET \
--url https://api.venice.ai/api/v1/api_keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venice.ai/api/v1/api_keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.venice.ai/api/v1/api_keys', 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.venice.ai/api/v1/api_keys",
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.venice.ai/api/v1/api_keys"
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.venice.ai/api/v1/api_keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/api_keys")
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{
"data": [
{
"apiKeyType": "ADMIN",
"consumptionLimits": {
"usd": 50,
"diem": 10,
"vcu": 30
},
"limitPeriod": "MONTH",
"createdAt": "2023-10-01T12:00:00.000Z",
"expiresAt": "2023-10-01T12:00:00.000Z",
"id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
"last6Chars": "2V2jNW",
"lastUsedAt": "2023-10-01T12:00:00.000Z",
"description": "Example API Key",
"usage": {
"trailingSevenDays": {
"usd": "10.2424",
"vcu": "42.2315",
"diem": "4.2231"
}
},
"currentPeriodUsage": {
"usd": "5.1234",
"diem": "2.5000"
}
}
],
"object": "list"
}{
"error": "<string>"
}{
"error": "<string>"
}Questa pagina è stata utile?
⌘I