Welcome to the AI Gateway! This service allows you to integrate your own AI models or utilize preconfigured AI APIs (e.g., OpenAI, Hugging Face) directly within your integrations. You can call AI endpoints, register your own, and use them seamlessly in your Integrations and Action scripts.
Your Integrations is having data from the Trigger that you want to transform with AI, or analyze it and send the result to another data storage.
Your Integration App for Contract Management always run an AI analysis on the uploaded contract to make sure it complies with all your policies.
Scripting Support in Integrations
You can start using predefined endpoints such as chatgpt
without additional setup.
Example JavaScript that you can add to your Integration or Action:
var prompt = "Summarize this text: The quick brown fox jumps over the lazy dog.";
var response = await callAI("chatgpt", JSON.stringify({
prompt: prompt,
max_tokens: 100
}));
log(response);
If you have your own AI model or service, you can register it for use in JINT scripts.
Send a POST request to the AI Gateway to register your endpoint.
Endpoint:
POST <https://api.copyl.com/ms/AIGateway/register>
Request Body:
{
"name": "myCustomAI",
"url": "<https://your-ai-service.com/api>"
}
Response:
{
"success": true,
"message": "Endpoint registered successfully."
}
After registering, you can use the endpoint in your Copyl Integration and Action scripts.
Example Script: