Swift AI
Endpoints
List Models 1
List all available models for all endpoints
OpenAI Endpoints 2
OpenAI-compatible endpoints, such as `/chat/completions` and `/responses`, can be used with any model that supports the respective endpoint, including Claude, Gemini, DeepSeek, and others. Check the pricing table to see which endpoints are supported by each model.
Anthropic Endpoints 1
Anthropic-compatible endpoints, such as `/messages`, can be used with any model that supports this endpoint, including Claude and other compatible models. Check the pricing table to see which endpoints are supported by each model.
Google Endpoints 1
Google-compatible endpoints, such as `/generateContent`, can be used with any model that supports this endpoint, including Gemini and other compatible models. Check the pricing table to see which endpoints are supported by each model.
Audio 1
Turn audio into text or text into audio.
Embeddings 1
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
Moderations 1
Given some input text, outputs if the model classifies it as potentially harmful across several categories.
What is the Swift AI API?
Access a wide range of AI models⚡, including OpenAI 🤖,DeepSeek 🔍, Claude 🧠, Gemini 🌟, and Meta LLaMA 🦙, with seamless compatibility via the Swift API ⚡
Swift AI API is available on the JoJ API marketplace. Subscribe with a single JoJ API key, call it through one gateway, and pay from one wallet — no separate account or contract with the provider.
Swift AI API endpoints
- GET
/modelsList Models
Return a list of available models on this API
- POST
/chat/completionsCreate Chat Completion
Creates a model response for the given chat conversation.
- POST
/responsesResponses
Creates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model’s response.
- POST
/messagesMessages
The official Anthropic API endpoint for generating conversational responses using Claude models. This endpoint supports text and multimodal inputs, including images and documents, depending on the capabilities of the selected model. It also supports multi-turn conversations, system instructions, tool use (function calling), extended thinking, prompt caching, structured content blocks, and configurable generation parameters.
- POST
/generateContentGenerate Content
The official Google Gemini API endpoint for generating content using Gemini models. This endpoint supports multimodal inputs, including text, images, audio, video, and documents, depending on the capabilities of the selected model. It also supports conversation history, system instructions, function calling, structured JSON output, safety settings, and configurable generation parameters.
- POST
/audio/speechCreate Speech
Generates audio from the input text.
- POST
/embeddingsCreate Embeddings
Creates an embedding vector representing the input text.
- POST
/moderationsCreate Moderation
Classifies if text is potentially harmful.
Frequently asked questions about Swift AI API
How are credits calculated?
1M credits represent $1 which is calculated based on consumed model’s input and output pricing.
Does the API support streaming?
Yes, the API supports streaming.