Authorization header. This tutorial gets your key into an environment variable, sends it on a real request, and checks that it works.
API keys (sk_...) are the default: one key, sent directly as the Bearer value, with no token exchange or expiry handling. Client ID / Client Secret with OAuth2 access tokens is the legacy path, still supported for existing integrations but deprecated. If you maintain one, jump to Legacy: client credentials and OAuth.
What you’ll do
- Set your API key - Store it securely in an environment variable
- Send the key in API calls - Include it in the
Authorizationheader of every request - Test your setup - Run a quick request to confirm the key works
Prerequisites
Before starting, ensure you have:- A Gloo AI Studio account
- Your API key from the API Keys page
- PHP 8.0 or later, if you follow the PHP examples
Step 1: Set your API key
Create a.env file in your project root:
GLOO_API_KEY=your_api_key_here
export GLOO_API_KEY="your_api_key_here"
Never hardcode your key, add
.env to your .gitignore so the key never reaches source control, use the key only on your server, and never log it. See API Key Security. For retrying transient failures, see Error Handling and Retries.Step 2: Send the key in API calls
Send the key in theAuthorization header of every request:
Authorization: Bearer YOUR_API_KEY
/ai/v2/guarded/chat/completions). The same API key works on the Responses API (/ai/v2/guarded/responses). So does Direct Responses. Only the URL and request shape differ.
import os
import requests
from dotenv import load_dotenv
load_dotenv()
API_KEY = os.environ["GLOO_API_KEY"]
def make_authenticated_request(endpoint, payload=None):
"""Make an authenticated API request."""
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
if payload:
response = requests.post(endpoint, headers=headers, json=payload)
else:
response = requests.get(endpoint, headers=headers)
response.raise_for_status()
return response.json()
# Example usage
result = make_authenticated_request(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
{
"model": "gloo-anthropic-claude-opus-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}
)
import axios from 'axios';
require('dotenv').config();
if (!process.env.GLOO_API_KEY) throw new Error('Set GLOO_API_KEY in your environment');
const API_KEY = process.env.GLOO_API_KEY;
async function makeAuthenticatedRequest(endpoint, payload = null) {
const config = {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
};
if (payload) {
const response = await axios.post(endpoint, payload, config);
return response.data;
} else {
const response = await axios.get(endpoint, config);
return response.data;
}
}
// Example usage
const result = await makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
{
model: "gloo-anthropic-claude-opus-5.5",
messages: [{ role: "user", content: "Hello!" }]
}
);
import axios from 'axios';
import * as dotenv from 'dotenv';
dotenv.config();
if (!process.env.GLOO_API_KEY) throw new Error('Set GLOO_API_KEY in your environment');
const API_KEY = process.env.GLOO_API_KEY;
async function makeAuthenticatedRequest(endpoint: string, payload?: any): Promise<any> {
const config = {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
};
if (payload) {
const response = await axios.post(endpoint, payload, config);
return response.data;
} else {
const response = await axios.get(endpoint, config);
return response.data;
}
}
// Example usage
const result = await makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
{
model: "gloo-anthropic-claude-opus-5.5",
messages: [{ role: "user", content: "Hello!" }]
}
);
<?php
require_once 'vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
$API_KEY = $_ENV['GLOO_API_KEY'] ?? throw new RuntimeException('Set the GLOO_API_KEY environment variable');
function makeAuthenticatedRequest($endpoint, $payload = null) {
global $API_KEY;
$headers = [
'Authorization: Bearer ' . $API_KEY,
'Content-Type: application/json'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
if ($payload) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
}
$result = curl_exec($ch);
if (curl_errno($ch)) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
return json_decode($result, true);
}
// Example usage
$result = makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
[
'model' => 'gloo-anthropic-claude-opus-5.5',
'messages' => [['role' => 'user', 'content' => 'Hello!']]
]
);
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"os"
)
func getEnv(key, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}
return fallback
}
func mustGetEnv(key string) string {
value, ok := os.LookupEnv(key)
if !ok || value == "" {
panic(key + " is not set")
}
return value
}
var apiKey = mustGetEnv("GLOO_API_KEY")
func makeAuthenticatedRequest(endpoint string, payload []byte) ([]byte, error) {
var req *http.Request
var err error
if payload != nil {
req, err = http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
} else {
req, err = http.NewRequest("GET", endpoint, nil)
}
if err != nil {
return nil, err
}
req.Header.Add("Authorization", "Bearer "+apiKey)
req.Header.Add("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
return ioutil.ReadAll(resp.Body)
}
// Example usage
func main() {
payload := []byte(`{
"model": "gloo-anthropic-claude-opus-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}`)
result, err := makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
payload,
)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Println(string(result))
}
import com.google.gson.Gson;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class AuthManager {
private static final String API_KEY = java.util.Objects.requireNonNull(System.getenv("GLOO_API_KEY"), "Set the GLOO_API_KEY environment variable");
private static final HttpClient httpClient = HttpClient.newHttpClient();
public static String makeAuthenticatedRequest(String endpoint, String payload) throws IOException, InterruptedException {
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create(endpoint))
.header("Authorization", "Bearer " + API_KEY)
.header("Content-Type", "application/json");
if (payload != null) {
requestBuilder.POST(HttpRequest.BodyPublishers.ofString(payload));
} else {
requestBuilder.GET();
}
HttpRequest request = requestBuilder.build();
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new IOException("API call failed: " + response.body());
}
return response.body();
}
// Example usage
public static void main(String[] args) {
String payload = """
{
"model": "gloo-anthropic-claude-opus-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}
""";
try {
String result = makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
payload
);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Step 3: Test your setup
Verify your setup with a simple test:def test_authentication():
"""Test authentication flow."""
try:
result = make_authenticated_request(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
{
"model": "gloo-anthropic-claude-opus-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}
)
print("✓ Authentication successful")
print(result)
return True
except Exception as e:
print(f"✗ Authentication failed: {e}")
return False
if __name__ == "__main__":
test_authentication()
async function testAuthentication() {
try {
const result = await makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
{
model: "gloo-anthropic-claude-opus-5.5",
messages: [{ role: "user", content: "Hello!" }]
}
);
console.log("✓ Authentication successful");
console.log(result);
return true;
} catch (error) {
console.error("✗ Authentication failed:", error.message);
return false;
}
}
testAuthentication();
async function testAuthentication(): Promise<boolean> {
try {
const result = await makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
{
model: "gloo-anthropic-claude-opus-5.5",
messages: [{ role: "user", content: "Hello!" }]
}
);
console.log("✓ Authentication successful");
console.log(result);
return true;
} catch (error: any) {
console.error("✗ Authentication failed:", error.message);
return false;
}
}
testAuthentication();
function testAuthentication() {
try {
$result = makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
[
'model' => 'gloo-anthropic-claude-opus-5.5',
'messages' => [['role' => 'user', 'content' => 'Hello!']]
]
);
echo "✓ Authentication successful\n";
print_r($result);
return true;
} catch (Exception $e) {
echo "✗ Authentication failed: " . $e->getMessage() . "\n";
return false;
}
}
testAuthentication();
func testAuthentication() bool {
fmt.Println("Testing authentication...")
payload := []byte(`{
"model": "gloo-anthropic-claude-opus-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}`)
result, err := makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
payload,
)
if err != nil {
fmt.Printf("✗ Authentication failed: %v\n", err)
return false
}
fmt.Println("✓ Authentication successful")
fmt.Println(string(result))
return true
}
func main() {
testAuthentication()
}
public static boolean testAuthentication() {
String payload = """
{
"model": "gloo-anthropic-claude-opus-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}
""";
try {
String result = makeAuthenticatedRequest(
"https://platform.ai.gloo.com/ai/v2/guarded/chat/completions",
payload
);
System.out.println("✓ Authentication successful");
System.out.println(result);
return true;
} catch (Exception e) {
System.err.println("✗ Authentication failed: " + e.getMessage());
return false;
}
}
public static void main(String[] args) {
testAuthentication();
}
Complete code
View Complete Code
Clone or browse the complete working examples for all 6 languages (JavaScript, TypeScript, Python, PHP, Go, Java) with setup instructions.
Troubleshooting
401 Unauthorized
401 Unauthorized
Cause: Invalid or missing API keySolution: Verify your
GLOO_API_KEY is set correctly and has not been revokedUsing legacy client credentials? A 401 usually means the access token expired. See Legacy: client credentials and OAuth.403 Forbidden
403 Forbidden
Cause: Insufficient permissions, or a malformed or revoked API keySolution: Check your API access levels in the Studio and confirm the key has not been revoked
Legacy: client credentials and OAuth
Legacy and deprecated, sunset by December 2026. The OAuth2 client credentials flow below still works for existing integrations, but new integrations should use the API key authentication shown above. To migrate, create an API key in Studio and send it directly as the Bearer value; you can then delete the token exchange, expiry check, and refresh code in this section.
Environment variables
Environment variables
GLOO_CLIENT_ID=your_actual_client_id_here
GLOO_CLIENT_SECRET=your_actual_client_secret_here
Token exchange
Token exchange
import requests
import time
import os
from dotenv import load_dotenv
load_dotenv()
CLIENT_ID = os.getenv("GLOO_CLIENT_ID", "YOUR_CLIENT_ID")
CLIENT_SECRET = os.getenv("GLOO_CLIENT_SECRET", "YOUR_CLIENT_SECRET")
TOKEN_URL = "https://platform.ai.gloo.com/oauth2/token"
def get_access_token():
"""Retrieve a new access token from the Gloo AI API."""
headers = {"Content-Type": "application/x-www-form-urlencoded"}
data = {"grant_type": "client_credentials", "scope": "api/access"}
response = requests.post(TOKEN_URL, headers=headers, data=data, auth=(CLIENT_ID, CLIENT_SECRET))
response.raise_for_status()
token_data = response.json()
token_data['expires_at'] = int(time.time()) + token_data['expires_in']
return token_data
# Example usage
token_info = get_access_token()
print(f"Access token: {token_info['access_token']}")
print(f"Expires in: {token_info['expires_in']} seconds")
const axios = require('axios');
require('dotenv').config();
const CLIENT_ID = process.env.GLOO_CLIENT_ID || "YOUR_CLIENT_ID";
const CLIENT_SECRET = process.env.GLOO_CLIENT_SECRET || "YOUR_CLIENT_SECRET";
const TOKEN_URL = "https://platform.ai.gloo.com/oauth2/token";
async function getAccessToken() {
const body = 'grant_type=client_credentials&scope=api/access';
const response = await axios.post(TOKEN_URL, body, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
auth: { username: CLIENT_ID, password: CLIENT_SECRET }
});
const tokenData = response.data;
tokenData.expires_at = Math.floor(Date.now() / 1000) + tokenData.expires_in;
return tokenData;
}
// Example usage
getAccessToken().then(tokenInfo => {
console.log(`Access token: ${tokenInfo.access_token}`);
console.log(`Expires in: ${tokenInfo.expires_in} seconds`);
});
import axios from 'axios';
import * as dotenv from 'dotenv';
dotenv.config();
const CLIENT_ID = process.env.GLOO_CLIENT_ID || "YOUR_CLIENT_ID";
const CLIENT_SECRET = process.env.GLOO_CLIENT_SECRET || "YOUR_CLIENT_SECRET";
const TOKEN_URL = "https://platform.ai.gloo.com/oauth2/token";
interface TokenInfo {
access_token: string;
expires_in: number;
expires_at: number;
token_type: string;
}
async function getAccessToken(): Promise<TokenInfo> {
const body = 'grant_type=client_credentials&scope=api/access';
const response = await axios.post<TokenInfo>(TOKEN_URL, body, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
auth: { username: CLIENT_ID, password: CLIENT_SECRET }
});
const tokenData = response.data;
(tokenData as any).expires_at = Math.floor(Date.now() / 1000) + tokenData.expires_in;
return tokenData;
}
// Example usage
getAccessToken().then(tokenInfo => {
console.log(`Access token: ${tokenInfo.access_token}`);
console.log(`Expires in: ${tokenInfo.expires_in} seconds`);
});
<?php
require_once 'vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
$CLIENT_ID = $_ENV['GLOO_CLIENT_ID'] ?? throw new RuntimeException('Set GLOO_CLIENT_ID in your .env file');
$CLIENT_SECRET = $_ENV['GLOO_CLIENT_SECRET'] ?? throw new RuntimeException('Set GLOO_CLIENT_SECRET in your .env file');
$TOKEN_URL = 'https://platform.ai.gloo.com/oauth2/token';
function getAccessToken($client_id, $client_secret, $token_url) {
$post_data = 'grant_type=client_credentials&scope=api/access';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $token_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_USERPWD, $client_id . ':' . $client_secret);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
$result = curl_exec($ch);
if (curl_errno($ch)) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
$token_data = json_decode($result, true);
$token_data['expires_at'] = time() + $token_data['expires_in'];
return $token_data;
}
// Example usage
$token_info = getAccessToken($CLIENT_ID, $CLIENT_SECRET, $TOKEN_URL);
echo "Access token: " . $token_info['access_token'] . "\n";
echo "Expires in: " . $token_info['expires_in'] . " seconds\n";
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
"time"
)
var (
clientID = getEnv("GLOO_CLIENT_ID", "YOUR_CLIENT_ID")
clientSecret = getEnv("GLOO_CLIENT_SECRET", "YOUR_CLIENT_SECRET")
tokenURL = "https://platform.ai.gloo.com/oauth2/token"
)
type TokenInfo struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
ExpiresAt int64 `json:"expires_at"`
TokenType string `json:"token_type"`
}
func getAccessToken() (*TokenInfo, error) {
data := strings.NewReader("grant_type=client_credentials&scope=api/access")
req, err := http.NewRequest("POST", tokenURL, data)
if err != nil {
return nil, err
}
req.SetBasicAuth(clientID, clientSecret)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
bodyBytes, _ := ioutil.ReadAll(resp.Body)
return nil, fmt.Errorf("failed to get token: %s - %s", resp.Status, string(bodyBytes))
}
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
var token TokenInfo
if err := json.Unmarshal(body, &token); err != nil {
return nil, err
}
token.ExpiresAt = time.Now().Unix() + int64(token.ExpiresIn)
return &token, nil
}
func getEnv(key, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}
return fallback
}
// Example usage
func main() {
tokenInfo, err := getAccessToken()
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
fmt.Printf("Access token: %s\n", tokenInfo.AccessToken)
fmt.Printf("Expires in: %d seconds\n", tokenInfo.ExpiresIn)
}
import com.google.gson.Gson;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Instant;
import java.util.Base64;
public class AuthManager {
private static final String CLIENT_ID = System.getenv().getOrDefault("GLOO_CLIENT_ID", "YOUR_CLIENT_ID");
private static final String CLIENT_SECRET = System.getenv().getOrDefault("GLOO_CLIENT_SECRET", "YOUR_CLIENT_SECRET");
private static final String TOKEN_URL = "https://platform.ai.gloo.com/oauth2/token";
private static final HttpClient httpClient = HttpClient.newHttpClient();
private static final Gson gson = new Gson();
public static class TokenInfo {
public String access_token;
public int expires_in;
public long expires_at;
public String token_type;
}
public static TokenInfo getAccessToken() throws IOException, InterruptedException {
String auth = CLIENT_ID + ":" + CLIENT_SECRET;
String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes());
String requestBody = "grant_type=client_credentials&scope=api/access";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(TOKEN_URL))
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Authorization", "Basic " + encodedAuth)
.POST(HttpRequest.BodyPublishers.ofString(requestBody))
.build();
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() != 200) {
throw new IOException("Failed to get access token: " + response.body());
}
TokenInfo token = gson.fromJson(response.body(), TokenInfo.class);
token.expires_at = Instant.now().getEpochSecond() + token.expires_in;
return token;
}
// Example usage
public static void main(String[] args) {
try {
TokenInfo tokenInfo = getAccessToken();
System.out.println("Access token: " + tokenInfo.access_token);
System.out.println("Expires in: " + tokenInfo.expires_in + " seconds");
} catch (Exception e) {
e.printStackTrace();
}
}
}
Token management and refresh
Token management and refresh
# Global token storage
access_token_info = {}
def is_token_expired(token_info):
"""Check if the token is expired or close to expiring."""
if not token_info or 'expires_at' not in token_info:
return True
return time.time() > (token_info['expires_at'] - 60)
def ensure_valid_token():
"""Ensure we have a valid access token."""
global access_token_info
if is_token_expired(access_token_info):
print("Getting new access token...")
access_token_info = get_access_token()
return access_token_info['access_token']
# Usage in API calls
def make_api_call():
token = ensure_valid_token()
headers = {"Authorization": f"Bearer {token}"}
# Make your API call here
// Global token storage
let tokenInfo = {};
function isTokenExpired(token) {
if (!token || !token.expires_at) return true;
return (Date.now() / 1000) > (token.expires_at - 60);
}
async function ensureValidToken() {
if (isTokenExpired(tokenInfo)) {
console.log("Getting new access token...");
tokenInfo = await getAccessToken();
}
return tokenInfo.access_token;
}
// Usage in API calls
async function makeApiCall() {
const token = await ensureValidToken();
const headers = { 'Authorization': `Bearer ${token}` };
// Make your API call here
}
// Global token storage
let tokenInfo: TokenInfo | null = null;
function isTokenExpired(token: TokenInfo | null): boolean {
if (!token || !(token as any).expires_at) return true;
return (Date.now() / 1000) > ((token as any).expires_at - 60);
}
async function ensureValidToken(): Promise<string> {
if (isTokenExpired(tokenInfo)) {
console.log("Getting new access token...");
tokenInfo = await getAccessToken();
}
return tokenInfo!.access_token;
}
// Usage in API calls
async function makeApiCall(): Promise<void> {
const token = await ensureValidToken();
const headers = { 'Authorization': `Bearer ${token}` };
// Make your API call here
}
// Global token storage
$token_info = [];
function isTokenExpired($token) {
if (empty($token) || !isset($token['expires_at'])) {
return true;
}
return time() > ($token['expires_at'] - 60);
}
function ensureValidToken() {
global $token_info, $CLIENT_ID, $CLIENT_SECRET, $TOKEN_URL;
if (isTokenExpired($token_info)) {
echo "Getting new access token...\n";
$token_info = getAccessToken($CLIENT_ID, $CLIENT_SECRET, $TOKEN_URL);
}
return $token_info['access_token'];
}
// Usage in API calls
function makeApiCall() {
$token = ensureValidToken();
$headers = ['Authorization: Bearer ' . $token];
// Make your API call here
}
var tokenInfo *TokenInfo
func isTokenExpired(token *TokenInfo) bool {
if token == nil || token.ExpiresAt == 0 {
return true
}
return time.Now().Unix() > (token.ExpiresAt - 60)
}
func ensureValidToken() (string, error) {
if isTokenExpired(tokenInfo) {
fmt.Println("Getting new access token...")
var err error
tokenInfo, err = getAccessToken()
if err != nil {
return "", err
}
}
return tokenInfo.AccessToken, nil
}
// Usage in API calls
func makeApiCall() error {
token, err := ensureValidToken()
if err != nil {
return err
}
// Use token in Authorization header
// Make your API call here
return nil
}
private static TokenInfo tokenInfo;
public static boolean isTokenExpired(TokenInfo token) {
if (token == null || token.expires_at == 0) {
return true;
}
return Instant.now().getEpochSecond() > (token.expires_at - 60);
}
public static String ensureValidToken() throws IOException, InterruptedException {
if (isTokenExpired(tokenInfo)) {
System.out.println("Getting new access token...");
tokenInfo = getAccessToken();
}
return tokenInfo.access_token;
}
// Usage in API calls
public static void makeApiCall() throws IOException, InterruptedException {
String token = ensureValidToken();
// Use token in Authorization header
// Make your API call here
}
Next steps
Use your key in other Gloo AI tutorials:Build with Direct Responses
Make your first call, stream answers, and hold a multi-turn conversation.
Responses API
Build on the guarded Responses API: text, vision, image generation and tool use.
Using the Completions API
Generate text completions, including model selection, model_family and grounded completions.
API Reference
Explore all available endpoints.

