API.Market
Go to API.market
  • Welcome to API.market
  • What are API Products?
  • How to subscribe to a SaaS API Product?
  • Managing Subscriptions
  • Analytics & Logs
  • How can I cancel my Subscription?
  • How do I add payment details?
  • How does API.market charges me?
  • Error Codes
  • Seller Docs
    • API Seller Console
    • What is an API Product?
    • What is a Pricing Plan
    • Importing an API Source
    • Creating a Product using the Wizard
    • Testing Your APIs & Products
    • Analytics & Logs
    • Custom Usage
    • Overriding Custom Usage on Result Retrieval
  • FUNDAMENTALS
    • Convert Postman Collection to OpenAPI Yaml
    • Create OpenAPI spec using ChatGPT
  • About Us
  • API Product Docs
    • MagicAPI
      • Screenshot API
      • Domain Availability Checker API
      • WhoIS API
      • PDF Conversion API
      • Image Upscale API
      • DNS Checker API
      • Ageify API
      • Image Restoration API
      • Toon Me API
      • Coding Assistant
      • 🎭 FaceSwap API: Instantaneous replaces face with one another
      • 🏞️ Image Upload API
      • Deblurer API
      • Hair Changer API
      • 🤳🏻🤖AI Qr Code Generator API
      • Whisper API
      • Image Colorizer API
      • OpenJourney API
      • Object Remover API
      • Image Captioner API
      • Object Detector API
      • NSFW API
      • Crunchbase API
      • Pipfeed's Extract API Developer Documentation
      • Migrating from Capix FaceSwap API to magicapi/faceswap-capix API
    • BridgeML
      • Meta-Llama-3-8B-Instruct
      • Meta-Llama-3-70B-Instruct
      • Mistral-7B-Instruct-v0.1
      • Mixtral-8x22B-Instruct-v0.1
      • Meta-Llama-2-7b
      • Meta-Llama-2-13b
      • Meta-Llama-2-70b
      • Gemma-7b-it
      • NeuralHermes-2.5-Mistral-7B
      • BAAI/bge-large-en-v1.5
      • CodeLlama-70b-Instruct-hf
      • 🤖🧗Text-to-Image API
      • 📝🎧 Text to Audio API
    • Capix AI
      • FaceSwap Image and Video Face Swap API
      • MakeUp
      • Photolab.me
      • AI Picture Colorizer
      • AI Picture Upscaler
      • AI Background Remover
      • Object Remover
      • TTS Universal
      • Home GPT
      • AI & Plagiarism Checker
      • AI Story Generator
      • AI Essay Generator
      • Book Title Generator
    • Trueway
      • ⛕ 🗺️ Trueway Routing API
      • 🌐📍Trueway Geocoding API: Forward and Reverse Geocoding
      • 🛤️ ⏱️Trueway Matrix API: Travel Distance and Time
      • 🏛️ Trueway Places API
    • AILabTools
      • Cartoon-Yourself
    • SharpAPI
      • 📄 AI-Powered Resume/CV Parsing API
      • 🛩️ Airports Database & Flight Duration API
    • Text to Speech
      • Turn your text into Magical-sounding Audio
Powered by GitBook
On this page
  1. API Product Docs
  2. BridgeML

🤖🧗Text-to-Image API

Fast text-to-image generation model capable of producing high-quality images

PreviousCodeLlama-70b-Instruct-hfNext📝🎧 Text to Audio API

Last updated 9 months ago

Developer Portal :

Introducing the MagicAPI , the ultimate solution for generating high-quality images from text prompts using advanced AI technology. This cutting-edge API is designed to deliver stunning visuals at lightning speed, making it the most affordable text-to-image API on the market today. Whether you're a developer, designer, or content creator, our API provides the perfect blend of performance and cost-efficiency.

Key Features

  • AI-Powered Generation: Leverage state-of-the-art AI to create ultra-high-definition images from text prompts.

  • Unmatched Speed: Generate images in seconds, ensuring your projects stay on track.

  • High-Quality Output: Create images that are perfect for production use, thanks to our specialized AI model.

  • Cost-Effective: Get the best value for your money with our competitively priced service.

  • Easy Integration: Simple API requests allow for seamless integration into your applications and workflows.

  • Customizable Settings: Tailor image generation to your needs with adjustable parameters.

Integration and Support

Getting started with the MagicAPI Text-to-Image API is easy. Our comprehensive documentation provides all the details you need to integrate quickly. Additionally, our support team is always available to help with any questions or issues you may encounter.

API Endpoints

  • POST /text-to-image : A fast text-to-image model that makes high-quality images in 4 steps

Input Schema

When using the API, the following fields are expected in the request body:

  • prompt (string, required, default: "an epic forest with mountain on the back and a great palatial big house"): The input text prompt for the image generation.

  • width (integer, required, default: 512): The width of the output image. Recommended values are 1024 or 1280.

  • height (integer, required, default: 512): The height of the output image. Recommended values are 1024 or 1280.

  • scheduler (string, optional, default: "K_EULER"): The scheduler type for the model. Available options include DDIM, DPMSolverMultistep, HeunDiscrete, KarrasDPM, K_EULER_ANCESTRAL, K_EULER, PNDM, and DPM++2MSDE.

  • num_outputs (integer, optional, default: 1): The number of images to output. Values range from 1 to 4.

  • guidance_scale (number, optional, default: 0): The scale for classifier-free guidance. Recommended values are between 7 and 8.

  • negative_prompt (string, optional, default: "worst quality, low quality"): A negative prompt to guide the image generation away from certain concepts.

  • num_inference_steps (integer, optional, default: 4): The number of denoising steps. The value 4 provides the best results.

Example Usage

Generating images with the MagicAPI Text-to-Image API is straightforward. Here’s a step-by-step example of how to use our API:

Step 1: Generate an Image

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/bridgeml/text-to-image/text-to-image' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "Futuristic space battle, hyper realistic, 4k",
  "height": 512,
  "width": 512,
  "scheduler": "K_EULER",
  "num_outputs": 1,
  "guidance_scale": 0,
  "negative_prompt": "worst quality, low quality",
  "num_inference_steps": 4
}'

Response:

{
  "status": "succeeded",
  "result": [
    "https://replicate.delivery/yhqm/ni159BXILdbmNFko8GfuMGCiIKAFfo1ERPOa6u95Bljm1fVmA/out-0.png"
  ]
}

Sample images

a majestic super advanced planet with a powerful space civilization
nice majestic house in front of a grand lush green mountain
aurora in a stary night with the hyper realistic planets
A pickup truck going up a mountain switchback

Developer Portal :

https://api.market/store/bridgeml/text-to-image
https://api.market/store/bridgeml/text-to-image
Text-to-Image API