universal API for JIMS application
Project description
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/chat
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jims_api-0.5.3.tar.gz.
File metadata
- Download URL: jims_api-0.5.3.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3baf09e9370f939183c9800575939d1f4e7a23c1931818831bf085951d6ff2ce
|
|
| MD5 |
07a20046f2dacb9bf7f5eff3ce573c39
|
|
| BLAKE2b-256 |
3aa5b6c1b172f7414df233d8a2bcecff1dfe3dd9c967f11b1ef9b56d8bb150c4
|
Provenance
The following attestation bundles were made for jims_api-0.5.3.tar.gz:
Publisher:
publish-jims-api.yml on epoch8/vedana
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jims_api-0.5.3.tar.gz -
Subject digest:
3baf09e9370f939183c9800575939d1f4e7a23c1931818831bf085951d6ff2ce - Sigstore transparency entry: 1016739148
- Sigstore integration time:
-
Permalink:
epoch8/vedana@d0740b7dbc1b082fec2d0fd6e49932beb3373660 -
Branch / Tag:
refs/tags/jims-0.5.3 - Owner: https://github.com/epoch8
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-jims-api.yml@d0740b7dbc1b082fec2d0fd6e49932beb3373660 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jims_api-0.5.3-py3-none-any.whl.
File metadata
- Download URL: jims_api-0.5.3-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
003b484cd5b4be46d5e0b48a72dbaee06daeaf901cfdbb1f85f83ec230a657bc
|
|
| MD5 |
b3effd8f3543efdb7cfec2f5bed8eab7
|
|
| BLAKE2b-256 |
9acf091a967e97df6bb321c5ec96b8f1fe218f973be3e0bf8833c5c43559ddee
|
Provenance
The following attestation bundles were made for jims_api-0.5.3-py3-none-any.whl:
Publisher:
publish-jims-api.yml on epoch8/vedana
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jims_api-0.5.3-py3-none-any.whl -
Subject digest:
003b484cd5b4be46d5e0b48a72dbaee06daeaf901cfdbb1f85f83ec230a657bc - Sigstore transparency entry: 1016739175
- Sigstore integration time:
-
Permalink:
epoch8/vedana@d0740b7dbc1b082fec2d0fd6e49932beb3373660 -
Branch / Tag:
refs/tags/jims-0.5.3 - Owner: https://github.com/epoch8
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-jims-api.yml@d0740b7dbc1b082fec2d0fd6e49932beb3373660 -
Trigger Event:
push
-
Statement type: