Check API access
curl --request GET \
--url https://your-sutro-deployment.example.com/v1/try-authentication \
--header 'Authorization: <authorization>'import requests
url = "https://your-sutro-deployment.example.com/v1/try-authentication"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://your-sutro-deployment.example.com/v1/try-authentication', 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://your-sutro-deployment.example.com/v1/try-authentication",
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: <authorization>"
],
]);
$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://your-sutro-deployment.example.com/v1/try-authentication"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://your-sutro-deployment.example.com/v1/try-authentication")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-sutro-deployment.example.com/v1/try-authentication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyAPI
Check API access
Verify that your deployment API key can reach Sutro Batch.
GET
/
v1
/
try-authentication
Check API access
curl --request GET \
--url https://your-sutro-deployment.example.com/v1/try-authentication \
--header 'Authorization: <authorization>'import requests
url = "https://your-sutro-deployment.example.com/v1/try-authentication"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://your-sutro-deployment.example.com/v1/try-authentication', 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://your-sutro-deployment.example.com/v1/try-authentication",
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: <authorization>"
],
]);
$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://your-sutro-deployment.example.com/v1/try-authentication"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://your-sutro-deployment.example.com/v1/try-authentication")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-sutro-deployment.example.com/v1/try-authentication")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyConfigure your deployment URL and API key before
using this example.
After this check succeeds, inspect your quotas or
submit a Batch job.
SUTRO_API_URL is the deployment origin; curl appends
/v1 explicitly.
This read-only check verifies the request through your Sutro deployment
and the Batch service. It does not submit work or consume inference quota.
string
required
Deployment API key in the form
Key YOUR_SUTRO_API_KEY.curl --fail-with-body "${SUTRO_API_URL%/}/v1/try-authentication" \
-H "Authorization: Key $SUTRO_API_KEY"
Response
{"authenticated": true}
Troubleshooting
If this check fails, validate the key against your deployment:curl --fail-with-body "${SUTRO_API_URL%/}/v1/auth/check" \
-H "Authorization: Key $SUTRO_API_KEY"
/v1/auth/check returns authenticated: true and the key’s principal when the
key is valid. It does not verify that Batch can accept requests. Imported keys
are also checked against their original key authority.
| Result | Next step |
|---|---|
/auth/check returns 401 | Check that the URL and key belong to the same deployment and that the key has not been revoked. |
/auth/check succeeds but /try-authentication fails | Contact the Sutro team to check the deployment’s Batch connection and account authorization. |
503 | The deployment or a required service is unavailable or not configured. Retry after the administrator resolves the issue. |
| An HTML sign-in page or redirect | Check the hostname and /v1 path. If they are correct, ask your administrator to enable API access for that deployment. |