Prompts

Process a prompt request

post

Processes a user prompt and returns an AI-generated response. The request must contain a valid API key.

Authorizations
Body
promptstringRequired

The question that the user sends to the AI agent

Example: How does quantum entanglement work?
Responses
200
Successfully processed the prompt and returned a response.
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"
}