v1
latestOpenAPI 3.1.0Apache-2.02026-07-1783444.0 KBconfidential-embeddings
Handler for confidential embeddings requests
This endpoint processes embedding requests with additional confidential computing guarantees. It forwards the request to the embeddings service and returns an encrypted response that can only be decrypted by the client.
Arguments
- request_metadata - Extension containing request context like stack ID and encryption details
- state - Application state containing service URLs and shared resources
- payload - The embedding request body as JSON
Returns
Returns a Result containing either:
- Json<Value> - The encrypted embeddings response
- AtomaServiceError - Error details if the request processing fails
Errors
Returns AtomaServiceError::InternalError if:
- The embeddings service request fails
- Response processing or encryption fails
- Stack compute unit updates fail
Example Request
{
"model": "text-embedding-ada-002",
"input": "The quick brown fox jumps over the lazy dog"
}
post/v1/confidential/embeddings
Request body
Response
Confidential embeddings generated successfully
Example response
{
"usage": {
"completion_tokens": 12,
"prompt_tokens": 9,
"prompt_tokens_details": {
"cached_tokens": 1
},
"total_tokens": 21
}
}