Welcome to the unified API platform. Our API follows RESTful conventions and returns JSON
responses.
You can access GPT-4, Claude, Gemini and Deepseek through a single, consistent interface.
๐ You can test all the cURL commands directly in your Command Prompt without any additional programming setup. If any of the examples donโt work, please let us know.
๐If you need the code in another programming language, you can generate it using AI tools like ChatGPT, Grok, or Gemini by simply providing the cURL command they will create the code for you.
https://apiswitchv2.leapcell.app/
All API requests require authentication using your API key and Email. Include your key and email in the query parameters of each request.
Authorization Header
&key=your_api_key_here&email=your_email_here
Interact with AI models like ChatGPT, Claude, Deepseek, Gemini, and
Grok through our unified chat endpoint. Place this code in the CMD to check if it is
working or not.
Models that support Chat:
โ gpt-4.1-nano
(We highly recommand to use this model in your application. also use the
model that has in the each examples.changing the model names may give you errors
sometimes)
โ gpt-4.1
โ gpt-4o-mini
โ claude-3-opus
โ gemini-2.0-flash-001
โ gpt-4.1-mini
โ deepseek-chat
โ grok-2
| Param | Type | Description |
|---|---|---|
| Message | string | Message for the model. |
| model | string | ID of the model to use (e.g., gpt-4,
claude-3) .
|
| apikey | string | Your own private apikey. Get one for free |
| string | Your email that signed in to our platform.Sign in |
curl "https://apiswitchv2.leapcell.app/chat?message=hi&model=gpt-4o&email=Your_Email_Here&apikey=Your_APIkey_Here"
import requests
url = "https://apiswitchv2.leapcell.app/chat"
params = {
"message": "Hello, how are you today?",
"model": "gpt-4o",
"email": "Your_Email_Here",
"apikey": "Your_APIkey_Here"
}
response = requests.get(url, params=params)
if response.status_code == 200:
print(response.json()) # or response.text
else:
print(f"Error: {response.status_code} - {response.text}")
const fetch = require('node-fetch');
const url = new URL("https://apiswitchv2.leapcell.app/chat");
url.searchParams.append("message", "Hello, how are you today?");
url.searchParams.append("model", "gpt-4o");
url.searchParams.append("email", "Your_Email_Here");
url.searchParams.append("apikey", "Your_APIkey_Here");
fetch(url)
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error("Error:", err));
Generate text and immediately convert the response to speech in a single call. Useful for voice assistants.
| Param | Type | Description |
|---|---|---|
| message | string | The user message sent to the chat AI. |
| model | string | The AI model to use (e.g., gpt-4o). |
| tts | boolean | If true, returns text-to-speech audio instead of
text. |
| tl | string | Language code for TTS (e.g., en, fr).
|
| string | User email for identification or logging. | |
| apikey | string | API key used for authentication. |
curl "https://apiswitchv2.leapcell.app/chat?message=hello&model=gpt-4o&tts=true&tl=en&email=Your_Email_Here&apikey=Your_APIkey_Here" -o tts.mp3
import requests
url = "https://apiswitchv2.leapcell.app/chat"
params = {
"message": "hello",
"model": "gpt-4o",
"tts": "true",
"tl": "en",
"email": "Your_Email_Here",
"apikey": "Your_APIkey_Here"
}
response = requests.get(url, params=params)
if response.status_code == 200:
with open("tts.mp3", "wb") as f:
f.write(response.content)
print("Audio saved as tts.mp3")
else:
print(f"Error: {response.status_code} - {response.text}")
const fetch = require('node-fetch');
const fs = require('fs');
const url = new URL("https://apiswitchv2.leapcell.app/chat");
url.searchParams.append("message", "hello");
url.searchParams.append("model", "gpt-4o");
url.searchParams.append("tts", "true");
url.searchParams.append("tl", "en");
url.searchParams.append("email", "Your_Email_Here");
url.searchParams.append("apikey", "Your_APIkey_Here");
fetch(url)
.then(res => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.buffer();
})
.then(buffer => {
fs.writeFileSync("tts.mp3", buffer);
console.log("Audio saved as tts.mp3");
})
.catch(err => console.error("Error:", err));
Send images to vision-capable models to get descriptions, analyze content, or extract text.
๐Please avoid analyzing images repeatedly. Remember, you are not the only user on this platform. After successfully analyzing an image, you can analyze the next one after 30 seconds.
โ If this rule is not followed, we may have to temporarily ban your account. Since this is a free platform, please allow other users a chance to use it as well.โ
| Param | Type | Description |
|---|---|---|
| image_path_or_url | string | The URL or local path of the image to analyze (e.g., https://assets.puter.site/doge.jpeg). |
| prompt | string | The text prompt to instruct the model on what description or analysis to generate. |
| model | string | AI model to use (e.g., gpt-4o). |
| string | User email for identification or logging. | |
| apikey | string | API key used for authentication. |
curl -X POST "https://apiswitchv2.leapcell.app/recognize-image?image_path_or_url=https://assets.puter.site/doge.jpeg&prompt=Describe%20this%20meme%20in%20extreme%20detail,%20including%20text%20and%20emotions&model=gpt-4o&email=Your_Email_Here&apikey=Your_APIkey_Here"
import requests
url = "https://apiswitchv2.leapcell.app/recognize-image"
params = {
"image_path_or_url": "https://assets.puter.site/doge.jpeg",
"prompt": "Describe this meme in extreme detail, including text and emotions",
"model": "gpt-4o",
"email": "Your_Email_Here",
"apikey": "Your_APIkey_Here"
}
response = requests.post(url, params=params)
if response.status_code == 200:
print("Description:")
print(response.json() or response.text)
else:
print(f"Error: {response.status_code} - {response.text}")
const fetch = require('node-fetch');
const url = new URL("https://apiswitchv2.leapcell.app/recognize-image");
url.searchParams.append("image_path_or_url", "https://assets.puter.site/doge.jpeg");
url.searchParams.append("prompt", "Describe this meme in extreme detail, including text and emotions");
url.searchParams.append("model", "gpt-4o");
url.searchParams.append("email", "Your_Email_Here");
url.searchParams.append("apikey", "Your_APIkey_Here");
fetch(url, { method: 'POST' })
.then(res => res.json())
.then(data => console.log("Description:", data))
.catch(err => console.error("Error:", err));
Create Image within a second.
๐Please avoid creating images repeatedly. Remember, you are not the only user on this platform. We highly recommend waiting at least 30 seconds after successfully generating an image before creating the next one.
โ If this rule is not followed, we may have to temporarily ban your account. Since this is a free platform, please allow other users a chance to use it as well.โ
| Param | Type | Description |
|---|---|---|
| prompt | string | The text description for the AI to generate the image (e.g., A cyberpunk cat wearing sunglasses flying over Tokyo). |
| string | User email for identification or logging. | |
| apikey | string | API key used for authentication. |
curl "https://apiswitchv2.leapcell.app/image?prompt=A%20cyberpunk%20cat%20wearing%20sunglasses%20flying%20over%20tokyo&email=Your_Email_Here&apikey=Your_APIkey_Here" --output cat.jpg
import requests
url = "https://apiswitchv2.leapcell.app/image"
params = {
"prompt": "A cyberpunk cat wearing sunglasses flying over tokyo",
"email": "Your_Email_Here",
"apikey": "Your_APIkey_Here"
}
response = requests.get(url, params=params)
if response.status_code == 200:
with open("cat.jpg", "wb") as f:
f.write(response.content)
print("Image saved as cat.jpg")
else:
print(f"Error: {response.status_code} - {response.text}")
const fetch = require('node-fetch');
const fs = require('fs');
const url = new URL("https://apiswitchv2.leapcell.app/image");
url.searchParams.append("prompt", "A cyberpunk cat wearing sunglasses flying over tokyo");
url.searchParams.append("email", "Your_Email_Here");
url.searchParams.append("apikey", "Your_APIkey_Here");
fetch(url)
.then(res => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.buffer();
})
.then(buffer => {
fs.writeFileSync("cat.jpg", buffer);
console.log("Image saved as cat.jpg");
})
.catch(err => console.error("Error:", err));
Transcribe audio into text using state-of-the-art recognition models like Whisper.
โ Important Notice
When uploading audio files for transcription, your audio must meet the following requirements:
If your audio is in another format (e.g., MP3, AAC, stereo, or a different sample rate), you can easily convert it to the correct format using FFmpeg.
Example command to convert an MP3 file to WAV (16 kHz, mono, 16-bit PCM):
ffmpeg -i input.mp3 -ar 16000 -ac 1 -sample_fmt s16 output.wav
You can download FFmpeg from their official website: https://ffmpeg.org/download.html
โ Make sure your audio file meets these requirements to get the best transcription results.
| Param | Type | Description |
|---|---|---|
| model | string | The STT model to use (e.g., nestor-pro). |
| file | file | The audio file to transcribe. Use @filename with cURL for file upload. |
| string | User email for identification or logging. | |
| apikey | string | API key used for authentication. |
curl -X POST "https://apiswitchv2.leapcell.app/stt?model=nestor-pro&email=Your_Email_Here&apikey=Your_APIkey_Here" -F "file=@audio2.wav"
import requests
url = "https://apiswitchv2.leapcell.app/stt"
# File to upload
files = {
"file": ("audio2.wav", open("audio2.wav", "rb"), "audio/wav")
}
# Form data (as fields, not query params)
data = {
"model": "nestor-pro",
"email": "Your_Email_Here",
"apikey": "Your_APIkey_Here"
}
response = requests.post(url, data=data, files=files)
if response.status_code == 200:
print("Transcription:")
print(response.json()) # or response.text
else:
print(f"Error: {response.status_code} - {response.text}")
const fetch = require('node-fetch');
const fs = require('fs');
const FormData = require('form-data');
const form = new FormData();
form.append('model', 'nestor-pro');
form.append('email', 'Your_Email_Here');
form.append('apikey', 'Your_APIkey_Here');
form.append('file', fs.createReadStream('audio2.wav'), {
filename: 'audio2.wav',
contentType: 'audio/wav'
});
fetch('https://apiswitchv2.leapcell.app/stt', {
method: 'POST',
body: form
})
.then(res => res.json())
.then(data => console.log('Transcription:', data))
.catch(err => console.error('Error:', err));