AWS Bedrock Converse proxy
curl --request POST \
--url https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Blindsight-AWS-Access-Key-Id: <x-blindsight-aws-access-key-id>' \
--header 'X-Blindsight-AWS-Region: <x-blindsight-aws-region>' \
--header 'X-Blindsight-AWS-Secret-Access-Key: <x-blindsight-aws-secret-access-key>' \
--data '
{
"messages": [
{
"role": "user",
"content": [
{
"text": "Hello"
}
]
}
]
}
'import requests
url = "https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse"
payload = { "messages": [
{
"role": "user",
"content": [{ "text": "Hello" }]
}
] }
headers = {
"X-Blindsight-AWS-Access-Key-Id": "<x-blindsight-aws-access-key-id>",
"X-Blindsight-AWS-Secret-Access-Key": "<x-blindsight-aws-secret-access-key>",
"X-Blindsight-AWS-Region": "<x-blindsight-aws-region>",
"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-Blindsight-AWS-Access-Key-Id': '<x-blindsight-aws-access-key-id>',
'X-Blindsight-AWS-Secret-Access-Key': '<x-blindsight-aws-secret-access-key>',
'X-Blindsight-AWS-Region': '<x-blindsight-aws-region>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({messages: [{role: 'user', content: [{text: 'Hello'}]}]})
};
fetch('https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse', 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://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse",
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([
'messages' => [
[
'role' => 'user',
'content' => [
[
'text' => 'Hello'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Blindsight-AWS-Access-Key-Id: <x-blindsight-aws-access-key-id>",
"X-Blindsight-AWS-Region: <x-blindsight-aws-region>",
"X-Blindsight-AWS-Secret-Access-Key: <x-blindsight-aws-secret-access-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/api/runtime-security/proxy/bedrock/model/{modelId}/converse"
payload := strings.NewReader("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Blindsight-AWS-Access-Key-Id", "<x-blindsight-aws-access-key-id>")
req.Header.Add("X-Blindsight-AWS-Secret-Access-Key", "<x-blindsight-aws-secret-access-key>")
req.Header.Add("X-Blindsight-AWS-Region", "<x-blindsight-aws-region>")
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/api/runtime-security/proxy/bedrock/model/{modelId}/converse")
.header("X-Blindsight-AWS-Access-Key-Id", "<x-blindsight-aws-access-key-id>")
.header("X-Blindsight-AWS-Secret-Access-Key", "<x-blindsight-aws-secret-access-key>")
.header("X-Blindsight-AWS-Region", "<x-blindsight-aws-region>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Blindsight-AWS-Access-Key-Id"] = '<x-blindsight-aws-access-key-id>'
request["X-Blindsight-AWS-Secret-Access-Key"] = '<x-blindsight-aws-secret-access-key>'
request["X-Blindsight-AWS-Region"] = '<x-blindsight-aws-region>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>",
"type": "<string>"
}{
"detail": "<string>"
}{
"message": "<string>",
"type": "<string>"
}{
"detail": "<string>"
}Proxy
AWS Bedrock Converse proxy
The proxy signs the upstream call with AWS SigV4 using the credentials
you pass in the X-Blindsight-AWS-* headers. Streaming
(converse-stream) is not available. Authenticate to Blindsight with
X-API-Key (permission runtime:scan).
POST
/
api
/
runtime-security
/
proxy
/
bedrock
/
model
/
{modelId}
/
converse
AWS Bedrock Converse proxy
curl --request POST \
--url https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Blindsight-AWS-Access-Key-Id: <x-blindsight-aws-access-key-id>' \
--header 'X-Blindsight-AWS-Region: <x-blindsight-aws-region>' \
--header 'X-Blindsight-AWS-Secret-Access-Key: <x-blindsight-aws-secret-access-key>' \
--data '
{
"messages": [
{
"role": "user",
"content": [
{
"text": "Hello"
}
]
}
]
}
'import requests
url = "https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse"
payload = { "messages": [
{
"role": "user",
"content": [{ "text": "Hello" }]
}
] }
headers = {
"X-Blindsight-AWS-Access-Key-Id": "<x-blindsight-aws-access-key-id>",
"X-Blindsight-AWS-Secret-Access-Key": "<x-blindsight-aws-secret-access-key>",
"X-Blindsight-AWS-Region": "<x-blindsight-aws-region>",
"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-Blindsight-AWS-Access-Key-Id': '<x-blindsight-aws-access-key-id>',
'X-Blindsight-AWS-Secret-Access-Key': '<x-blindsight-aws-secret-access-key>',
'X-Blindsight-AWS-Region': '<x-blindsight-aws-region>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({messages: [{role: 'user', content: [{text: 'Hello'}]}]})
};
fetch('https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse', 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://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse",
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([
'messages' => [
[
'role' => 'user',
'content' => [
[
'text' => 'Hello'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Blindsight-AWS-Access-Key-Id: <x-blindsight-aws-access-key-id>",
"X-Blindsight-AWS-Region: <x-blindsight-aws-region>",
"X-Blindsight-AWS-Secret-Access-Key: <x-blindsight-aws-secret-access-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/api/runtime-security/proxy/bedrock/model/{modelId}/converse"
payload := strings.NewReader("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Blindsight-AWS-Access-Key-Id", "<x-blindsight-aws-access-key-id>")
req.Header.Add("X-Blindsight-AWS-Secret-Access-Key", "<x-blindsight-aws-secret-access-key>")
req.Header.Add("X-Blindsight-AWS-Region", "<x-blindsight-aws-region>")
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/api/runtime-security/proxy/bedrock/model/{modelId}/converse")
.header("X-Blindsight-AWS-Access-Key-Id", "<x-blindsight-aws-access-key-id>")
.header("X-Blindsight-AWS-Secret-Access-Key", "<x-blindsight-aws-secret-access-key>")
.header("X-Blindsight-AWS-Region", "<x-blindsight-aws-region>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.blindsight.io/api/runtime-security/proxy/bedrock/model/{modelId}/converse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Blindsight-AWS-Access-Key-Id"] = '<x-blindsight-aws-access-key-id>'
request["X-Blindsight-AWS-Secret-Access-Key"] = '<x-blindsight-aws-secret-access-key>'
request["X-Blindsight-AWS-Region"] = '<x-blindsight-aws-region>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"text\": \"Hello\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>",
"type": "<string>"
}{
"detail": "<string>"
}{
"message": "<string>",
"type": "<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
Body
application/json
The body is of type object.
Response
The Bedrock Converse response
The response is of type object.

