API Usage
Warning
This service is currently in beta phase and is updated regularly. The same applies to the documentation.
The Arcana Manager exposes and api endpoint for you to use. With the api endpoint you can perform all the actions that the frontend Arcana Manager is capable of.
To use the API, you’ll first need an API key, which you can request on our website. This key works across all our services. If you’re already using the LLMs via the api, you can use the same key. Otherwise you can request your key following this documentation.
Info
If you want to chat with an Arcana using the LLM Chat completions API refer to this section in the SAIA-Documentation
Base Route
All Routes for the RAG/Arcana-API start with
https://chat-ai.academiccloud.de/v1/arcanas/api/v1/
Note that every api request needs to start with https://chat-ai.academiccloud.de/v1/. Routes that start with https://chat-ai.academiccloud.de/arcanas/ are not compatible with API keys.
See below for a full list of API routes.
API Minimal Example
Here is a minimal working example of how use the API.
curl \
--url https://chat-ai.academiccloud.de/v1/arcanas/api/v1/ \
--header 'Accept: application/json' \
--header 'Authorization: <api_key>'Response
{
"message":"Welcome to the SAIA RAG Web API",
"docs_url":"http://chat-ai.academiccloud.de/arcanas/api/v1/docs"
}Examples and API Documentation
Get All Your Arcanas
curl \
--url https://chat-ai.academiccloud.de/v1/arcanas/api/v1/arcana/ \
--header 'Accept: application/json' \
--header 'Authorization: <api_key>'Get a Specific Arcana
curl \
--url https://chat-ai.academiccloud.de/v1/arcanas/api/v1/arcana/<arcana-name> \
--header 'Accept: application/json' \
--header 'Authorization: <api_key>'Add a new File to your Arcana
Every new file needs to be send in its own request.
curl -i -X POST "https://chat-ai.academiccloud.de/v1/arcanas/api/v1/arcana/<arcana-name>/files/" \
-H "accept: application/json" \
-H 'Authorization: <api_key>' \
-H "Content-Type: multipart/form-data" \
-F "file=@<filename>"The response will be null with a status code of 200 if the upload worked
Index an Arcana
Index generation is synchronous i.e. the HTTP request only responds once the index has been created. If the request is canceled, the index generation will finish in the background.
Full List of Routes
The list of all available routes can be found under:
- In Web-Browser:
https://chat-ai.academiccloud.de/arcanas/api/v1/docs - Via API:
https://chat-ai.academiccloud.de/v1/arcanas/api/v1/openapi.json
Note that the routes are relative i.e. they need to be prefixed with https://chat-ai.academiccloud.de/v1/arcanas/api/v1.