Prompts
Processes a user prompt and returns an AI-generated response. The request must contain a valid API key.
Authorizations
Body
promptstringRequiredExample:
The question that the user sends to the AI agent
How does quantum entanglement work?
Responses
200
Successfully processed the prompt and returned a response.
application/json
403
Invalid API key or secret key. Ensure that you are using a valid authentication key.
application/json
500
Unexpected error occurred while processing the request. Please try again later.
application/json
post
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"
}