jims-api
jims-api exposes any JIMS application as a FastAPI HTTP service.
Run
jims-api --app my_project.app:app --port 8080
Environment variables:
JIMS_APP- JIMS app import path (module:attr)JIMS_PORT- HTTP portJIMS_HOST- HTTP hostJIMS_API_KEY- optional static bearer token for authJIMS_AUTHENTIK_URL- Authentik instance base URL (e.g.https://authentik.epoch8.dev)JIMS_AUTHENTIK_APP_SLUG- Authentik application slug to check access against
Authentication
Auth is checked in the following order:
- If
JIMS_API_KEYis set and the provided bearer token matches — allow - If
JIMS_AUTHENTIK_URLandJIMS_AUTHENTIK_APP_SLUGare set — validate the bearer token against Authentik's/api/v3/core/applications/{slug}/check_access/endpoint. If 200 — allow - If no auth is configured (neither static key nor Authentik) — open access
- Otherwise — 401 Unauthorized
Send the token as Authorization: Bearer <token>.
Endpoints
GET /healthzPOST /api/v1/chatPOST /api/v1/chat/stream
POST /api/v1/chat
Request:
{
"contact_id": "customer:42",
"message": "Hello",
"thread_id": null,
"thread_config": {"interface": "api"},
"event_type": "comm.user_message",
"run_conversation_start_on_new_thread": false
}
Response:
{
"thread_id": "0194f0f3-d88d-7cca-8f37-ff44f911f539",
"created_new_thread": true,
"assistant_messages": ["Hi! How can I help?"],
"events": [
{
"event_type": "comm.assistant_message",
"event_data": {"role": "assistant", "content": "Hi! How can I help?"}
}
]
}
Send the API token as Authorization: Bearer <token> (see Authentication above).
POST /api/v1/chat/stream
Same request body as /api/v1/chat, but the response is a text/event-stream (SSE) instead of a single JSON object.
Use this to show the user live progress (e.g. "Searching knowledge base...") while the pipeline is running.
Request: same as /api/v1/chat.
The stream emits the following event types:
status- an agent status update, emitted while the pipeline is running:event: status data: {"status": "Searching knowledge base...", "type": "searching_knowledge_base"}typeis a stable identifier;statusis a string that may change between releases.result- the final response, with the same shape as the/api/v1/chatresponse body:event: result data: {"thread_id": "...", "created_new_thread": true, "assistant_messages": ["Hi!"], "events": [...]}error- sent instead ofresultif the pipeline raised an exception:event: error data: {"detail": "Pipeline error: ..."}
A stream always ends with either a result or an error event.
Note: browsers' EventSource API cannot send custom headers, so it can't be used directly with
Authorization: Bearer <token> auth. Consume this endpoint with fetch and read the response body as a stream instead.
Metadata
Release files for jims-api 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jims_api-0.6.2.tar.gz | 10.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jims_api-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 kB
Release files / jims_api-0.6.2.tar.gz
| Download URL | jims_api-0.6.2.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a49f9102afc69be0bd2f2f224fea82df0e1952b943ce670ee338caaa915c6668
|
|
BLAKE2b-256 checksum How to use checksums |
5180f4b2edba69ad8a99a69a6a44419b28bb21948bebfa5b88324f16eb58e1df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency logRelease files / jims_api-0.6.2-py3-none-any.whl
| Download URL | jims_api-0.6.2-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
852ea09d3de322e275e368c9b41f8519189ec871b8cb8f0ba639139faf865685
|
|
BLAKE2b-256 checksum How to use checksums |
871c6a75d30a5cbd3dfe33406849e07d439da8571ce88560729a218237f283b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency log