Fal AI API Endpoints

API

Welcome to the Fal Platform API! We provide a powerful suite of AI-driven tools through our API, designed to give developers the flexibility to integrate AI features such as image generation, text-to-video conversion, audio processing, and more into their applications. Our API is built to be easy-to-use and scalable, enabling developers to leverage cutting-edge AI technology for a wide range of use cases.

To get started, developers need to obtain an API Key. Here’s how:

  1. Sign up for an account on fal.icu (or log in if you already have an account).
  2. Navigate to the Account Settings > API Tokens section in your dashboard.
  3. Click on Generate token. This key will be your access token to use the API.
    • generate a new API token
  4. Keep your API key secure, as it is required for authentication on every API request.

You will use the base URL https://api.fal.icu/ followed by the endpoint path for each API call.

Below is the list of API endpoints available on the platform.

1. Image Generation API

  • Endpoint: POST https://api.fal.icu/image-generation
  • Parameters:
  • api_key (string, required): Your unique API key.
  • prompt (string, required): A descriptive text prompt to guide the image generation.
  • style (string, optional): A specific style for the image (e.g., “realistic”, “cartoon”).
  • resolution (string, optional): Desired resolution of the image (e.g., “1024×1024”).
  • Output: Returns a generated image URL and metadata.

2. Text-to-Video API

  • Endpoint: POST https://api.fal.icu/text-to-video
  • Parameters:
  • api_key (string, required): Your unique API key.
  • script (string, required): Text script to generate the video.
  • duration (integer, required): Desired video length in seconds.
  • resolution (string, optional): Video resolution (e.g., “1080p”, “4K”).
  • Output: Returns a video URL and metadata (e.g., duration, resolution).

3. Audio Processing API

  • Endpoint: POST https://api.fal.icu/audio-processing
  • Parameters:
  • api_key (string, required): Your unique API key.
  • audio_file (file, required): The audio file to be processed.
  • effect (string, optional): Audio effect to apply (e.g., “echo”, “normalize”).
  • Output: Processed audio file URL and metadata.

4. Text Summarization API

  • Endpoint: POST https://api.fal.icu/text-summarization
  • Parameters:
  • api_key (string, required): Your unique API key.
  • text (string, required): The text to be summarized.
  • length (string, optional): Desired summary length (e.g., “short”, “medium”, “detailed”).
  • Output: Returns a summarized version of the text.

5. Sentiment Analysis API

  • Endpoint: POST https://api.fal.icu/sentiment-analysis
  • Parameters:
  • api_key (string, required): Your unique API key.
  • text (string, required): The text for sentiment analysis.
  • Output: Returns sentiment results, such as “positive”, “neutral”, or “negative” with a confidence score.

6. Object Detection API

  • Endpoint: POST https://api.fal.icu/object-detection
  • Parameters:
  • api_key (string, required): Your unique API key.
  • image_url (string, required): URL of the image where objects will be detected.
  • threshold (float, optional): Confidence threshold for detecting objects (default: 0.5).
  • Output: Returns detected objects, their locations, and confidence scores.

7. Text Translation API

  • Endpoint: POST https://api.fal.icu/text-translation
  • Parameters:
  • api_key (string, required): Your unique API key.
  • text (string, required): The text to be translated.
  • target_language (string, required): The language to translate the text into (e.g., “fr” for French, “es” for Spanish).
  • Output: Returns the translated text.

8. Voice Synthesis API

  • Endpoint: POST https://api.fal.icu/voice-synthesis
  • Parameters:
  • api_key (string, required): Your unique API key.
  • text (string, required): Text to convert into speech.
  • voice (string, optional): Voice style (e.g., “male”, “female”, “robotic”).
  • language (string, optional): Language for voice synthesis (e.g., “en-US”).
  • Output: Returns an audio file URL containing the synthesized speech.

9. Face Recognition API

  • Endpoint: POST https://api.fal.icu/face-recognition
  • Parameters:
  • api_key (string, required): Your unique API key.
  • image_url (string, required): URL of the image containing faces to be recognized.
  • Output: Returns recognized faces with metadata (e.g., coordinates, confidence score).

10. Image Upscaling API

  • Endpoint: POST https://api.fal.icu/image-upscaling
  • Parameters:
  • api_key (string, required): Your unique API key.
  • image_url (string, required): URL of the image to upscale.
  • scale_factor (integer, optional): Factor to upscale the image (e.g., 2 for 2x upscaling).
  • Output: Returns a URL to the upscaled image.

We are also working on providing SDKs and libraries in various programming languages to make integrating the Fal API even easier. These tools will soon be available to help you access the API with minimal code, allowing for faster and more efficient development. Stay tuned!