Vast.ai API
Accounts
reset api key
1min
code examples curl location request put 'https //console vast ai/api/v0/commands/reset apikey/' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "client id" "" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "client id" "" }); var requestoptions = { method 'put', headers myheaders, body raw, redirect 'follow' }; fetch("https //console vast ai/api/v0/commands/reset apikey/", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //console vast ai/api/v0/commands/reset apikey/") https = net http new(url host, url port) https use ssl = true request = net http put new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "client id" "" }) response = https request(request) puts response read body import requests import json url = "https //console vast ai/api/v0/commands/reset apikey/" payload = json dumps({ "client id" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", url, headers=headers, data=payload) print(response text) responses // success response { "sent" true, "key" "new api key value" }// not found { "success" false, "error" "", "msg" "" }// too many requests { "detail" "api requests too frequent endpoint threshold=3 0" }