Prompts
Processes a user prompt and returns an AI-generated response. The request must contain a valid API key.
Custom authentication header
The question that the user sends to the AI agent
How does quantum entanglement work?Successfully processed the prompt and returned a response.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Unexpected error occurred while processing the request. Please try again later.
POST /external/prompts HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"prompt": "How does quantum entanglement work?"
}{
"totalTokens": 12345,
"response": "The theory of relativity explains how time and space are linked"
}Creates a user prompt and returns an ID. The request must contain a valid API key.
Custom authentication header
The question that the user sends to the AI agent
How does quantum entanglement work?Successfully created the prompt and returned an ID.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Unexpected error occurred while processing the request. Please try again later.
POST /external/prompts/async HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"prompt": "How does quantum entanglement work?"
}{
"promptId": "1234567890"
}Returns a response on a user prompt by ID. The request must contain a valid API key.
Custom authentication header
Provide the prompt ID to process.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3bSuccessfully returned a response on the prompt. Returns null if the prompt is not ready.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Unexpected error occurred while processing the request. Please try again later.
GET /external/prompts/{id}/response-on HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
{
"totalTokens": 12345,
"response": "The theory of relativity explains how time and space are linked"
}Last updated

