GET /api/text
The /api/text
endpoint allows you to send requests for both text-to-text and text-image-to-text models.
Endpoint Details
- Method:
GET
- Authorization:
Bearer <your_api_key>
- Content-Type:
application/json
Parameters
Field | Type | Required | Description |
---|
model | string | True | Name of the model to be used. Example: llama3.2:3b . |
system_prompt | string | False | The system prompt to pass into the LLM. Default: You're a helpful assistant. |
input | string | True | Your input to the LLM. |
chat_history | string[][] | False | Array of conversation tuples [[user_msg, llm_msg]] to pass a chat history. |
images | string[] | False | Array of image URLs ["example.com/example.jpg"] . Requires a vision model. |
Returns
Field | Type | Description |
---|
model | string | Name of the model used. Ex: llama3.2:3b . |
created_at | integer | Time the message was created. |
message | string | Response from the LLM. |
Response Codes