Google Gemini proxy
curl --request POST \
--url https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello"
}
]
}
]
}
'import requests
url = "https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437"
payload = { "contents": [
{
"role": "user",
"parts": [{ "text": "Hello" }]
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({contents: [{role: 'user', parts: [{text: 'Hello'}]}]})
};
fetch('https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'role' => 'user',
'parts' => [
[
'text' => 'Hello'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": 123,
"status": "<string>",
"message": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"error": {
"code": 123,
"status": "<string>",
"message": "<string>"
}
}{
"detail": "<string>"
}Proxy
Google Gemini proxy
action is generateContent or streamGenerateContent; any other
action returns 400 with the status unsupported_endpoint. Send your
Google key in x-goog-api-key. Authenticate to Blindsight with
X-API-Key (permission runtime:scan).
POST
/
api
/
runtime-security
/
proxy
/
gemini
/
v1beta
/
models
/
{model}
:
{action}
Google Gemini proxy
curl --request POST \
--url https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437 \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello"
}
]
}
]
}
'import requests
url = "https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437"
payload = { "contents": [
{
"role": "user",
"parts": [{ "text": "Hello" }]
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({contents: [{role: 'user', parts: [{text: 'Hello'}]}]})
};
fetch('https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'role' => 'user',
'parts' => [
[
'text' => 'Hello'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.blindsight.io:{action}/api/runtime-security/proxy/gemini/v1beta/models/{model}:62437")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": 123,
"status": "<string>",
"message": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"error": {
"code": 123,
"status": "<string>",
"message": "<string>"
}
}{
"detail": "<string>"
}Authorizations
Blindsight API key (ak_...). The permissions it needs are listed in
the API description and on each operation: runtime:scan for scan and
proxy routes, runtime:events:read for events, analytics, drift,
health and service status, runtime:config:read to read the
configuration and runtime:config:write to change it.
Headers
Path Parameters
Body
application/json
The body is of type object.
Response
The Gemini response, or an SSE stream
The response is of type object.

