Encrypted Chat Completions (RVENC)
Changed onCreate a chat completion from an end-to-end encrypted payload, decrypted only inside the confidential compute environment. Stateless: no chat history is kept and no files can be attached.
Request
- Base URLhttps://gateway.prem.io
- AuthHTTP bearer and API key in header Authorization
Headers
Maximum seconds the request may wait in the inference queue when no capacity is free (decimals allowed). 0 never queues: a saturated model answers 429 immediately. Values above the server budget (10s) are capped; the header can only shorten the wait, never extend it. Invalid values are ignored. A request that cannot be admitted in time gets 429 with Retry-After.
Request body
Example request
{
"encryptedInference": "encrypted_inference_payload_data",
"cipherText": "cipher_text_for_key_exchange",
"nonce": "nonce_value",
"model": "deepseek-v4.1-flash"
}Response
RVENC chat completion response. Returns JSON when stream is false or omitted (default), or a server-sent events stream when stream is true.
Example response
{
"encryptedResponse": "a1b2c3d4e5f67890abcdef1234567890abcdef123456789012345678901234567890abcdef",
"nonce": "f6e5d4c3b2a19876543210fedcba9876",
"usage": {
"model": "qwen36-27b",
"prompt_tokens": 10,
"completion_tokens": 5,
"reasoning_tokens": 0,
"total_tokens": 15
}
}Changes
- breaking
the request property
became required - warning
added the new
405.00enum value to the/response property for the response status - warning
added the new
405.00enum value to the/response property for the response status - warning
added the new
405.00enum value to theresponse property for the response status - warning
added the new
409.00enum value to the/response property for the response status - warning
added the new
409.00enum value to the/response property for the response status - warning
added the new
409.00enum value to theresponse property for the response status - warning
added the new
500.00enum value to the/response property for the response status - warning
added the new
500.00enum value to the/response property for the response status - warning
added the new
500.00enum value to theresponse property for the response status - info
added the new optional
headerrequest parameterX-Queue-Timeout - info
added the new
maxenum value to the request property/ - info
added the new
xhighenum value to the request property/ - info
added the non-success response with the status
- breaking
- info
endpoint added
- info