mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-22 17:20:17 +00:00
82 lines
1.4 KiB
TeX
82 lines
1.4 KiB
TeX
\section{API Reference}
|
|
|
|
|
|
\subsection{HLLM Routing Endpoint}
|
|
|
|
\textbf{POST} \texttt{/v1/hllm/route}
|
|
|
|
Request:
|
|
\begin{lstlisting}[language=json]
|
|
{
|
|
"user_id": "user_123",
|
|
"input": "Explain quantum computing",
|
|
"context": ["Previous messages..."],
|
|
"preferences": {
|
|
"max_cost_usd": 0.01,
|
|
"min_quality": 0.8
|
|
}
|
|
}
|
|
\end{lstlisting}
|
|
|
|
Response:
|
|
\begin{lstlisting}[language=json]
|
|
{
|
|
"model": "claude-3-opus",
|
|
"regime": "Exploration",
|
|
"efe": -2.34,
|
|
"estimated_cost_usd": 0.008,
|
|
"expected_quality": 0.92
|
|
}
|
|
\end{lstlisting}
|
|
|
|
\subsection{PQC Key Establishment}
|
|
|
|
\textbf{POST} \texttt{/v1/pqc/encapsulate}
|
|
|
|
Request:
|
|
\begin{lstlisting}[language=json]
|
|
{
|
|
"encapsulation_key": "base64...",
|
|
"algorithm": "ML-KEM-768",
|
|
"privacy_tier": 2
|
|
}
|
|
\end{lstlisting}
|
|
|
|
Response:
|
|
\begin{lstlisting}[language=json]
|
|
{
|
|
"ciphertext": "base64...",
|
|
"shared_secret_hash": "blake3..."
|
|
}
|
|
\end{lstlisting}
|
|
|
|
\subsection{Runtime Deployment}
|
|
|
|
\textbf{POST} \texttt{/v1/runtime/deploy}
|
|
|
|
Request:
|
|
\begin{lstlisting}[language=json]
|
|
{
|
|
"runtime_type": "docker",
|
|
"image": "nginx:latest",
|
|
"replicas": 3,
|
|
"resources": {
|
|
"cpu": 2.0,
|
|
"memory_gb": 4,
|
|
"gpu_count": 0
|
|
},
|
|
"privacy_tier": 1
|
|
}
|
|
\end{lstlisting}
|
|
|
|
Response:
|
|
\begin{lstlisting}[language=json]
|
|
{
|
|
"deployment_id": "dep_abc123",
|
|
"status": "deploying",
|
|
"estimated_cost_per_hour": 0.15,
|
|
"blockchain_tx": "0xabc..."
|
|
}
|
|
\end{lstlisting}
|
|
|