Chaves de API
Gerar chave de API com carteira Web3
Returns the token, and with “address” a readable message bound to that wallet, required to generate an INFERENCE API key via a wallet.
GET
/
api_keys
/
generate_web3_key
/api/v1/api_keys/generate_web3_key
curl --request GET \
--url https://api.venice.ai/api/v1/api_keys/generate_web3_key \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venice.ai/api/v1/api_keys/generate_web3_key"
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/generate_web3_key', 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/generate_web3_key",
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/generate_web3_key"
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/generate_web3_key")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/api_keys/generate_web3_key")
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": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"message": "Venice API key request\n\nSign this only if you are creating a Venice inference API key for this wallet. The key spends from this wallet's Venice account.\n\nWallet: <your checksummed wallet address>\nKey type: INFERENCE\nIssued by: api.venice.ai\nChain ID: 8453\nNonce: 3f9a1c2b7d4e5f60a1b2c3d4e5f60718\nIssued At: 2026-11-25T00:00:00.000Z\nExpiration Time: 2026-11-25T00:15:00.000Z"
},
"success": true
}Criação autônoma de chave de API por agente
Consulte este guia sobre como usar este endpoint.Autorizações
Parâmetros de consulta
Esta página foi útil?
⌘I
/api/v1/api_keys/generate_web3_key
curl --request GET \
--url https://api.venice.ai/api/v1/api_keys/generate_web3_key \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venice.ai/api/v1/api_keys/generate_web3_key"
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/generate_web3_key', 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/generate_web3_key",
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/generate_web3_key"
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/generate_web3_key")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/api_keys/generate_web3_key")
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": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"message": "Venice API key request\n\nSign this only if you are creating a Venice inference API key for this wallet. The key spends from this wallet's Venice account.\n\nWallet: <your checksummed wallet address>\nKey type: INFERENCE\nIssued by: api.venice.ai\nChain ID: 8453\nNonce: 3f9a1c2b7d4e5f60a1b2c3d4e5f60718\nIssued At: 2026-11-25T00:00:00.000Z\nExpiration Time: 2026-11-25T00:15:00.000Z"
},
"success": true
}