curl --request POST \
--url https://gateway.widebot.net/api/v1/AQL/chat/completions \
--header 'Content-Type: application/json' \
--header 'x-bot: <api-key>' \
--header 'x-user-auth: <api-key>' \
--data '
{
"Message": "اكتب لي مقالاً قصيراً عن أهمية الذكاء الاصطناعي في التعليم",
"Config": {
"Temperature": 0.8,
"MaxTokens": 2048,
"TopProbability": 0.9,
"RepetitionPenalty": 0.1
},
"PromptStyle": 5
}
'{
"StatusCode": 200,
"Response": {
"text": "القاهرة هي العاصمة الرسمية لجمهورية مصر العربية...",
"metadata": {
"input_tokens": 123,
"generated_tokens": 123,
"total_tokens": 123,
"generation_time": 123
}
},
"Consumption": "147/10000000"
}{
"StatusCode": 401,
"Response": "Invalid authentication token",
"Consumption": "0/1000"
}{
"StatusCode": 401,
"Response": "Invalid authentication token",
"Consumption": "0/1000"
}{
"StatusCode": 401,
"Response": "Invalid authentication token",
"Consumption": "0/1000"
}Chat Completion
Standard chat completion API that supports both single messages and conversation history for context-aware responses.
Key Features:
- Single message or conversation history support
- Configurable generation parameters
- Arabic language optimization
- Token usage tracking
Note: Example requests/responses shown here are illustrative. When using the live “Try it” tool, you may see two responses: an HTTP status preview from the client and the API’s JSON body (StandardResponse envelope).
POST
/
api
/
v1
/
AQL
/
chat
/
completions
curl --request POST \
--url https://gateway.widebot.net/api/v1/AQL/chat/completions \
--header 'Content-Type: application/json' \
--header 'x-bot: <api-key>' \
--header 'x-user-auth: <api-key>' \
--data '
{
"Message": "اكتب لي مقالاً قصيراً عن أهمية الذكاء الاصطناعي في التعليم",
"Config": {
"Temperature": 0.8,
"MaxTokens": 2048,
"TopProbability": 0.9,
"RepetitionPenalty": 0.1
},
"PromptStyle": 5
}
'{
"StatusCode": 200,
"Response": {
"text": "القاهرة هي العاصمة الرسمية لجمهورية مصر العربية...",
"metadata": {
"input_tokens": 123,
"generated_tokens": 123,
"total_tokens": 123,
"generation_time": 123
}
},
"Consumption": "147/10000000"
}{
"StatusCode": 401,
"Response": "Invalid authentication token",
"Consumption": "0/1000"
}{
"StatusCode": 401,
"Response": "Invalid authentication token",
"Consumption": "0/1000"
}{
"StatusCode": 401,
"Response": "Invalid authentication token",
"Consumption": "0/1000"
}Authorizations
Your API key from account settings
Your bot ID from account settings
Body
application/json
The message to send to the AQL model
Example:
"ما هي عاصمة مصر وما أهم معالمها السياحية؟"
Optional previous messages for context-aware conversations
Show child attributes
Show child attributes
Configuration parameters for text generation
Show child attributes
Show child attributes
Style of response generation:
- 0: Base (standard responses)
- 1: Expert (technical/formal)
- 2: Conversational (casual, dialogic)
- 3: Structured (organized with sections)
- 4: Concise (brief, to-the-point)
- 5: Detailed (comprehensive explanations)
Required range:
0 <= x <= 5Example:
3
Was this page helpful?

