The Ariha AI API provides access to advanced language model capabilities through a simple REST API endpoint. The API supports multiple roles and languages, allowing for customized AI interactions.
https://ariha-api.ariha.ai
Generate AI responses based on user queries with role and language preferences.
email:api_key
api_key
parameterPOST
application/json
Parameter | Type | Required | Description |
---|---|---|---|
api_key | string | Yes | Authentication key in format "email:api_key" |
query | string | Yes | The text query to process (1-200 characters) |
role | string | No | AI assistant role (default: "Assistant") |
language | string | No | Response language (default: "English") |
{
"api_key": "email@example.com:your_api_key_here",
"query": "Tell me about artificial intelligence",
"role": "Tutor",
"language": "English"
}
{
"api_key": "email@example.com:your_api_key_here",
"query": "Tell me about artificial intelligence"
}
{
"status": "success",
"message": "Response generated successfully",
"response": "AI-generated response text here"
}
{
"status": "error",
"message": "Error description here"
}
curl -X POST https://ariha-api.ariha.ai/api \
-H "Content-Type: application/json" \
-d '{
"api_key": "email@example.com:your_api_key_here",
"query": "Tell me about artificial intelligence",
"role": "Tutor",
"language": "English"
}'
import requests
url = "https://ariha-api.ariha.ai/api"
payload = {
"api_key": "email@example.com:your_api_key_here",
"query": "Tell me about artificial intelligence",
"role": "Tutor",
"language": "English"
}
response = requests.post(url, json=payload)
result = response.json()
if result["status"] == "success":
print(result["response"])
else:
print(f"Error: {result['message']}")
const url = 'https://ariha-api.ariha.ai/api';
const data = {
api_key: 'email@example.com:your_api_key_here',
query: 'Tell me about artificial intelligence',
role: 'Tutor',
language: 'English'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(result => {
if (result.status === 'success') {
console.log(result.response);
} else {
console.error('Error:', result.message);
}
})
.catch(error => console.error('Error:', error));
const axios = require('axios');
const url = 'https://ariha-api.ariha.ai/api';
const data = {
api_key: 'email@example.com:your_api_key_here',
query: 'Tell me about artificial intelligence',
role: 'Tutor',
language: 'English'
};
axios.post(url, data)
.then(response => {
if (response.data.status === 'success') {
console.log(response.data.response);
} else {
console.error('Error:', response.data.message);
}
})
.catch(error => console.error('Error:', error));