Generate text completions using AI models
This endpoint generates text completions based on the provided prompt and model. It's ideal for single-turn conversations, content generation, and text completion tasks.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Required | The model ID to use for generation (e.g., "qwen2.5:1.5b", "llama3.2:3b") |
prompt |
string | Required | The input text prompt for generation |
stream |
boolean | Required | Whether to stream the response (true) or return complete response (false) |
options |
object | Optional | Additional generation parameters |
system |
string | Optional | System message to set model behavior |
template |
string | Optional | Prompt template to use |
context |
array | Optional | Context from previous generations |
Request Example
Response
Try It Out
Chat completion with conversational AI
Use this endpoint for multi-turn conversations with the AI model.
Request Example
Get detailed model information
Retrieve detailed information about a specific model.
Authentication
Currently, the IT Ways AI API does not require authentication. All endpoints are publicly accessible. However, we recommend implementing rate limiting in your application.
Rate Limiting
To ensure fair usage and system stability, the following rate limits apply:
- 100 requests per hour per IP address
- 10 concurrent requests per IP address
- Large models may have additional processing time limits
Error Handling
The API uses standard HTTP status codes and returns error messages in JSON format:
Common Error Codes
| Code | Description |
|---|---|
400 |
Bad Request - Invalid parameters |
404 |
Not Found - Model or endpoint not found |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Internal Server Error |