Developpers - API
Last updated
Last updated
Swiftask is an AI aggregator platform allowing users to access AI functionalities provided by multiple vendors through a unified interface. This document describes how developers can interact with the Swiftask API to send and receive AI-generated responses.
To ensure secure access to the Swiftask API, authentication and authorization are required for all API requests. Below are the steps to obtain and use an API key, which is necessary for accessing the AI Bot endpoint.
Create an Account: If you haven't already, you need to sign up for an account at Swiftask.
Generate API Key: Once logged in, navigate to the Developers space section of your account, there, you will find an option to generate a new API key. Click on this option and label your new key for easy identification later.
Record Your API Key: After generation, your API key will be displayed. It is crucial to copy and securely store this key as it will not be visible again. If you lose your API key, you will need to generate a new one.
Below is a table listing each AI name along with its corresponding slug. This reference is crucial when making API requests to interact with different AI functionalities.
Agentic RAG V2
agentreact
Audio AI Transcription
audioia
Autonomous Browsing Agent (Beta)
autonomous-browsing-agent
ChatOnPDF
chatpdf
Claude 2.1
claudev21
Claude 3 Haiku
claude3haiku
Claude 3 Opus
claude3opus
Claude 3.5 Sonnet
claude35sonnet
Cohere
cohere
DALL-E 3
dallee3
DOCX DataSource
docx
Data Analysis Assistant
data-analysist
DataSource
datasource
DataSource Azure
azure
DataSource PDF
Document Analyzer
invoice_analyzer
DocumentAI
document-ai
ElevenLabs
elevenlabs
Event Hunter
eventhunter
Excel DataSource
excel
Face Restoration
facerestoration
Face To Many
facetomany
Flux Dev
fluxdev
Flux Pro
fluxpro
Flux Pro 1.1
fluxpro11
Flux Pro 1.1 Ultra
fluxproultra
GDocs
gdrive
GPT Pro
gpt4pro
GPT-3.5
gpt35
GPT-4 Turbo
gpt4
GPT-4V Turbo
gpt4vision
GPT-4o
gpt-4o
GPT-4o mini
gpt-4o-mini
Gemini 2.0 Flash
gemini-flash
Gemini Pro 1.5
geminipro
Gemini Pro 1.5 with Google search
gemini-pro-with-search
Ideogram V2
ideogramv2
Live Portrait
liveportrait
Llama 3
llama3
MagicColor
magiccolor
Meeting Transcription
audioainew
Meta Llama 3.1 405b
llama31
Mistral Codestral
codestral
Mistral Codestral Mamba
codestral-mamba
Mistral Large
mistrallarge
Mistral Medium
mistralmedium
Mistral Nemo
open-mistral-nemo
OCR
ocr
OCR Chat
chat-ocr
OpenAI o1-mini
o1-mini
OpenAI o1-preview
o1-preview
Perplexity
perplexityonline
Perplexity Pro
perplexitypro
PowerPoint DataSource
powerpoint
PuLID
pulid
Recraft V3
recraftv3
Runway Video Generator
runway
SQL Agent (BETA)
sqlagent
SVG Image Generator
recraftv3svg
Scrapio
scrapio
Share Credit
share_bot_credit
Stable Diffusion
stablediffusion
Swiftask
swiftask
Text to Speech
text2speech
Text to video with Luma AI
lumaai
Thanos
thanos
Thanos Lite
thanoslite
Web Search
webreporter
Website DataSource
website
Youtube Transcription
youtubeia
o1
o1
POST /ai/:slug
This endpoint is used to interact with a specific AI identified by a unique slug. It accepts JSON input containing session details and user input, and returns AI-generated responses.
URL Parameter:
slug
: Unique string identifier for the AI bot.
HTTP Method: POST
Headers:
Content-Type
: application/json
Authorization
: Bearer <swiftask_api_key>
Request body:
Response:
Sample curl request
Error Handling
Responses from this API will also include standard HTTP status codes to indicate success or failure of the requested operations. Common errors include:
400 Bad Request
: Input data is malformed or validation failed.
401 Unauthorized
: Missing or invalid authentication token.
404 Not Found
: The specified AI slug was not found.
500 Internal Server Error
: An error occurred on the server which was not the client's fault.
Usage guidelines
Ensure the session ID is unique for each session to avoid data conflicts.
Handle file data carefully, especially when dealing with personal or sensitive information.
Monitor your usage to avoid hitting subscription limits unexpectedly.
This API documentation covers the main aspects needed to integrate with various AI bots via Swiftask. For further details or support, contact the Swiftask support team.