EQTY LabDocs

Proxy LLM provider request

Verifies the agent's signature and project, runs the gateway's plugins, records the exchange for audit, and forwards the request, with the provider credentials the agent sent, to the provider's configured upstream. The path after the prefix is the provider's own API path: /v1/anthropic_api forwards to the Anthropic API, /v1/openai_api to the OpenAI API, and /v1/chatgpt_backend to the ChatGPT backend API, by default https://api.anthropic.com, https://api.openai.com, and https://chatgpt.com/backend-api. For example, POST /v1/anthropic_api/v1/messages calls the Anthropic Messages API. The provider's response, including streams, passes through. Request bodies are capped at the gateway's limit, 32 MiB by default. A plugin denial carries the plugin's status, usually 403 or 503.

gethttps://<host>/v1/chatgpt_backend/{path}
bash
curl --request GET \
  --url 'https://<host>/v1/chatgpt_backend/{path}' \
  --header 'Signature: <api-key>'
javascript
const response = await fetch("https://<host>/v1/chatgpt_backend/{path}", {
  method: "GET",
  headers: {
    "Signature": "<api-key>"
  }
});

const data = await response.json();
typescript
const response = await fetch("https://<host>/v1/chatgpt_backend/{path}", {
  method: "GET",
  headers: {
    "Signature": "<api-key>"
  }
});
if (!response.ok) throw new Error(`${response.status} ${response.statusText}`);

const data: string = await response.json();
python
import requests

response = requests.get(
    "https://<host>/v1/chatgpt_backend/{path}",
    headers={
        "Signature": "<api-key>",
    },
)
response.raise_for_status()
print(response.json())
go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://<host>/v1/chatgpt_backend/{path}", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Signature", "<api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, err := io.ReadAll(res.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Status, string(data))
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://<host>/v1/chatgpt_backend/{path}"))
            .header("Signature", "<api-key>")
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
csharp
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://<host>/v1/chatgpt_backend/{path}");
request.Headers.Add("Signature", "<api-key>");

using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
php
<?php

$ch = curl_init('https://<host>/v1/chatgpt_backend/{path}');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Signature: <api-key>',
    ],
    CURLOPT_RETURNTRANSFER => true,
]);

$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
echo $status . " " . $response . PHP_EOL;
ruby
require "net/http"

uri = URI("https://<host>/v1/chatgpt_backend/{path}")
request = Net::HTTP::Get.new(uri)
request["Signature"] = "<api-key>"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
puts "#{response.code} #{response.body}"
rust
// Cargo.toml dependencies: reqwest, tokio (features "full")

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let response = reqwest::Client::new()
        .get("https://<host>/v1/chatgpt_backend/{path}")
        .header("Signature", "<api-key>")
        .send()
        .await?;

    println!("{} {}", response.status(), response.text().await?);
    Ok(())
}

Authorizations

  • AgentSignature · API key in header "Signature" — An RFC 9421 HTTP message signature by a registered agent's Ed25519 or P-256 key, sent with its Signature-Input header. The keyid is the agent's registered DID, created must fall within the signature's maximum age and clock skew, and the covered components start with @method and @target-uri. A request with a body also covers content-digest. Proxy and relay requests cover x-viper-nonce, x-viper-timestamp, and either x-viper-state-cid (state in an uploaded blob) or x-viper-credential-cid (state in the agent's state attestation credential); credential renewal covers x-viper-nonce. Viper signs every request this way.

Parameters

Path parameters

NameTypeDescription
path
required
string

Provider API path, such as v1/messages or v1/chat/completions

Responses

200Provider response passthrough

application/json

string

Examplejson
"string"

401Unauthorized

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}

403Forbidden

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}

413Request Entity Too Large

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}

426Upgrade Required

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}

500Internal Server Error

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}

502Bad Gateway

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}

503Service Unavailable

application/json
  • codestring
  • correlation_idstring
  • messagestring
Examplejson
{
  "code": "string",
  "correlation_id": "string",
  "message": "string"
}