LogoLogo
AI TrainingUser Community
API Reference
API Reference
  • raia API
  • Users
  • Conversations
  • Prompts
  • Agents
  • Agent Files
  • Resource Usage Logs
  • Models
Powered by GitBook
On this page
Export as PDF

Prompts

PreviousConversationsNextAgents
CtrlK

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
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"
}