AI/ML API
ai_ml_apiAI/ML API provides a suite of AI models and solutions for various tasks, including text generation, image processing, and more.
Acciones disponibles (2)
Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.
Moderation CompletionAI_ML_API_MODERATION_COMPLETIONAcciónTool to classify input text or image for safety using a moderation model. use after receiving user-generated content to filter out unsafe material.
AI_ML_API_MODERATION_COMPLETIONAcciónTool to classify input text or image for safety using a moderation model. use after receiving user-generated content to filter out unsafe material.
Parámetros de entrada
inputstringObligatorioThe content to classify for safety. For text, provide the raw string. For images, provide a URL or base64-encoded data URI.
modelstringObligatorioID of the content moderation model to use. Choose any model from the documentation: https://docs.aimlapi.com/api-references/moderation-safety-models#all-available-content-moderation-models
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Text Chat CompletionAI_ML_API_TEXT_CHAT_COMPLETIONAcciónTool to generate text completions or chat responses using a specified llm model. use after assembling the conversation history to produce the next response.
AI_ML_API_TEXT_CHAT_COMPLETIONAcciónTool to generate text completions or chat responses using a specified llm model. use after assembling the conversation history to produce the next response.
Parámetros de entrada
nintegerNumber of completions to generate for each prompt.
stopstring[]Up to four sequences where the API will stop generating further tokens.
userstringUnique identifier representing the end-user.
modelstringObligatorioThe identifier of the model to use for generating responses.
top_pnumberNucleus sampling threshold; model considers tokens with cumulative probability up to top_p.
streambooleanWhether to stream the response as tokens are generated.
messagesobject[]ObligatorioList of message objects for conversation history.
logit_biasobjectAdjust the likelihood of specified tokens appearing in the completion.
max_tokensintegerMaximum number of tokens to generate in the response.
temperaturenumberSampling temperature between 0 and 1; higher values make output more random.
presence_penaltynumberPenalty for new tokens based on whether they appear in the text so far.
frequency_penaltynumberPenalty for new tokens based on their existing frequency in the text.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not