Skip to main content
Developer Documentation & Quickstart

Drop-in Setup & AWS SigV4 Bridge Architecture

Switch your API base URL to https://gateway.kiyaslabs.tech/v1. PromptRelay operates as a Universal Multi-Provider AI Gateway & AWS Bedrock SigV4 Bridge (BYOK), translating Bearer tokens to AWS SigV4 in volatile memory and routing across Gemini, Claude, and Llama.

The 1-Line Drop-In Change

Replace your SDK base URL with PromptRelay

baseURL = "https://gateway.kiyaslabs.tech/v1"

PromptRelay natively understands all OpenAI, Anthropic, and LangChain endpoints including /chat/completions and /embeddings. No SDK migrations or refactoring necessary.

AWS SigV4 Bridge: Under the Hood

How PromptRelay translates Bearer tokens to AWS Signature Version 4 signatures with sub-millisecond overhead.

1

HTTP Bearer Interception

Client application issues standard OpenAI or Anthropic SDK call containing Authorization: Bearer kl_beta_... to PromptRelay gateway.

2

Canonical Request Assembly

ECS Fargate relay parses the HTTP method, URI, headers, and request body hash (SHA256) into a standardized AWS Canonical Request format.

3

HMAC-SHA256 Volatile Signing

Computes String-to-Sign with AWS Credential Scope (date, region, bedrock service) and generates the AWS SigV4 authorization header in under 0.4ms in volatile RAM.

4

Amazon Bedrock Ingestion & Teeing

Forwards the cryptographically authenticated SigV4 request to Bedrock; tokens stream back through the stream-teeing engine while vector coordinates are indexed.

Custom Proxy Header Directives

Configure caching sensitivity, fallback targets, and security policies per request via HTTP headers.

Header NameDefaultTypeBehavior & Description
None (Optional)String (AIzaSy...)Google AI Studio API key for direct Google Gemini routing. Enables free-tier upstream inference while using standard OpenAI SDK formats.
0.85Float (0.00 - 1.00)Cosine similarity threshold for Titan Embeddings v2 vector lookup. Higher values (e.g. 0.92) enforce stricter semantic equivalence; lower values (e.g. 0.75) broaden cache hits.
anthropic.claude-3-haikuComma-separated stringOrdered list of Bedrock fallback models. If the primary model returns 429 (Rate Limit) or 503 (Unavailable), PromptRelay instantly retries the fallback model with zero downtime.
trueBooleanEnables the asynchronous stream-teeing engine. Serves SSE chunks to the caller with sub-millisecond overhead while concurrently assembling and indexing completions in background workers.
trueBooleanActivates real-time in-memory PII redaction (SSNs, credit card numbers, AWS access keys) before prompts reach upstream Bedrock foundational models.
Multi-Language SDK Quickstarts

Python, TypeScript, LangChain & Direct cURL Snippets

# Install: pip install openai
from openai import OpenAI

# Simply change the base_url to PromptRelay's gateway
client = OpenAI(
    base_url="https://gateway.kiyaslabs.tech/v1",
    api_key="kl_live_bedrock_demo"  # Your PromptRelay Ephemeral Key
)

# Call Bedrock Claude 3.5 Sonnet using standard OpenAI syntax
completion = client.chat.completions.create(
    model="anthropic.claude-3-5-sonnet",
    messages=[{"role": "user", "content": "Analyze AWS SigV4 bridge benefits"}],
    stream=True,
    extra_headers={
        "x-promptrelay-cache-threshold": "0.85",
        "x-promptrelay-fallback-models": "anthropic.claude-3-haiku,meta.llama3-70b"
    }
)

for chunk in completion:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
Target Gateway: https://gateway.kiyaslabs.tech/v1Compatible with Python 3.9+, Node.js 18+, Bun, Deno
Developer Slack & Discord

Need Help Integrating Custom Models?

Direct Technical Lead Inquiry

Dedicated Routing Channels

Enterprise Sandbox

enterprise@kiyaslabs.tech

Provisioning for enterprise subscriptions, dedicated VPC relays, and HIPAA BAAs.

Developer Support

support@kiyaslabs.tech

Inquiries regarding the AWS SigV4 translation bridge, OpenAI SDK drop-in, or stream-teeing.

Security Disclosures

security@kiyaslabs.tech

Encrypted PGP channel for vulnerability reporting, pen-test reports, and compliance reviews.

Kiyas Labs Technologies

Operating Entity for PromptRelay™ • Response SLA: Within 1 Business Day