How to get started with Midjourney API
TLDRThis tutorial from go API introduces enthusiasts to the unofficial Mid Journey API, designed to be integrated into existing workflows. Users can visit goapi.ai, explore the API's endpoints and pricing, and sign up via GitHub for free credits. The guide demonstrates using Postman to make POST requests with the API key for the 'Imagine' endpoint, submit a task, and then fetch the results to view generated images. The tutorial encourages liking, subscribing, and sharing for more content.
Takeaways
- 😀 The tutorial is for a non-official Midjourney API created by enthusiasts to assist users with their workflows.
- 🔍 To begin, visit goapi.ai, which offers the Midjourney API alongside other AI APIs like GPT and stable diffusion.
- 📚 Click on 'documentation' to access the latest version of the Midjourney API and review the available endpoints and processing modes.
- 💰 Check the 'pricing plan' to understand the cost of each 'Imagine' call, which varies based on the processing mode used.
- 👥 Sign up on the dashboard using GitHub to receive free credits to try out the service, and benefit from a referral program for additional credits.
- 🔑 After signing up, securely store your API key, which is essential for making requests.
- 🛠️ Use Postman, an API development platform, to create new HTTP requests to interact with the API.
- 📝 In Postman, set the request type to 'POST', paste the 'Imagine' endpoint, and include the API key in the headers.
- 📜 Copy and paste the example request code into Postman's body, modify it by removing the webhook endpoint and aspect ratio, then input your prompt.
- 🚀 After sending the 'Imagine' request, note the task ID returned, which is necessary for the next step.
- 🔄 Create a new 'POST' request for the 'Fetch' endpoint, using the example request code and replacing the task ID with the one obtained previously.
- 🖼️ Upon successful fetch, you will receive URLs to access the generated images, completing the process of using the Midjourney API.
Q & A
What is the purpose of the 'go API' tutorial?
-The purpose of the 'go API' tutorial is to show users how to get started with the Mid Journey API, which is a third-party API created by enthusiasts to help incorporate Mid Journey functionality into existing workflows.
Is the Mid Journey API provided by 'go API' an official API from Mid Journey?
-No, the Mid Journey API provided by 'go API' is not an official API from Mid Journey. It is created by a team of enthusiasts who are passionate about Mid Journey.
What types of APIs does 'go API' offer besides Mid Journey API?
-'go API' offers other APIs such as GPT, stable diffusion, and more, in addition to the Mid Journey API.
How can one access the documentation for the Mid Journey API?
-To access the documentation for the Mid Journey API, one should visit the 'go API' website, click on the 'mid-journey' button, and then click on 'documentation'.
What are the different processing modes available for the Mid Journey API?
-The Mid Journey API offers different processing modes such as 'relax', 'fast', and 'turbo', which correspond to their Mid Journey equivalents.
How can users sign up for the 'go API' dashboard?
-Users can sign up for the 'go API' dashboard using their GitHub account, which also provides them with free credits to try out the service.
What is the benefit of the referral program mentioned in the tutorial?
-The referral program allows users to share the service with friends. Both the referrer and the referred receive additional free credits when the service is used.
How should the API key obtained from the 'go API' dashboard be used?
-The API key should be stored safely and used in the header of the Postman requests as 'x-api-key' when making API calls to the 'go API'.
What is the process of making a request to the 'Imagine' endpoint using Postman?
-After setting the request type to POST and pasting the 'Imagine' endpoint, users should add the API key in the header, paste the example request code in the body, remove unnecessary parameters like 'web hook endpoint' and 'aspect ratio', and then input their prompt before sending the request.
How can users retrieve their images after a successful 'Imagine' request?
-After a successful 'Imagine' request, users will receive a task ID. They can then make a POST request to the 'Fetch' endpoint, using the task ID in the body of the request. Upon successful fetch, they will receive URLs to access the images.
What should users do if they want to see the images generated by the Mid Journey API?
-Users should copy one of the provided URLs after a successful fetch, paste it into a new browser tab, and they will be able to view the generated images.
Outlines
🚀 Introduction to Go API and Mid Journey API Tutorial
The script introduces Go API, a group of enthusiasts passionate about Mid Journey, who have created an unofficial API to help others. The tutorial aims to guide users on how to start using the Mid Journey API, which includes various endpoints and processing modes like relax, fast, and turbo. The video will focus on the 'Imagine' endpoint for a successful fetch task. The script also mentions pricing plans and a referral program for additional credits.
💻 Getting Started with Mid Journey API
The tutorial continues with instructions on how to get started with the Mid Journey API. Users are directed to the Go API website to sign up and obtain free credits via GitHub. It emphasizes the importance of storing the API key safely. The script then guides the user to use Postman, an API platform for developers, to set up a new HTTP request, change it to POST, and input the API key in the header. It provides a step-by-step guide on how to make a POST request using the 'Imagine' endpoint and process the task with a sample prompt.
🔑 API Key and Postman Setup
This section of the script details the process of obtaining and using the API key from the Go API dashboard. It explains how to copy the key and use it in Postman to make a POST request. The user is instructed to change the request type to POST in Postman, paste the endpoint, input the API key in the header, and then proceed to use the example request from the documentation, modifying it as necessary to include their own prompt.
📈 Task Submission and Fetching Results
The script explains how to submit a task using the 'Imagine' endpoint and then fetch the results. After sending the initial POST request with the prompt, the user receives a task ID. The tutorial then guides the user to create a new POST request for the fetch endpoint, using the task ID obtained from the previous step. The user is shown how to copy the necessary code, paste it into Postman, replace the task ID, and send the request to retrieve the image URLs.
🖼️ Viewing the Generated Images
The final part of the script instructs the user on how to view the generated images after the fetch request is successful. It mentions that there are two URLs provided for the images, which are the same, and the user can use either one. The user is advised to copy the URL, paste it into a new tab, and view the resulting images. The tutorial concludes with a thank you message, encouraging viewers to like and subscribe for more API-related content.
Mindmap
Keywords
💡Midjourney API
💡API
💡Endpoints
💡Processing Modes
💡Imagine Endpoint
💡Pricing Plan
💡GitHub
💡Postman
💡API Key
💡Fetch Endpoint
💡Task ID
Highlights
Introduction to a tutorial on getting started with the unofficial Midjourney API by go API.
The creators are enthusiasts passionate about Midjourney and aim to help others with the API.
The tutorial covers how to incorporate the API into existing workflows.
Instructions to visit goapi.ai for accessing the Midjourney API and other AI APIs.
Explanation of different processing modes: relax, fast, and turbo.
A walkthrough of the documentation for the latest version of the Midjourney API.
Demonstration of using the 'Imagine' endpoint for a successful fetch on the task submitted.
Pricing plan details for the Midjourney API and its cost-effectiveness.
How to sign up for the dashboard using GitHub and earn free credits.
Information about the referral program and earning additional free credits.
The importance of safely storing the API key obtained from the dashboard.
Using Postman as an API platform for developers to interact with the API.
Steps to create a new HTTP request in Postman and setting it to POST.
Instructions on adding the API key in the header for authentication.
Example request codes provided for Python, Node, and Curl.
How to send a prompt to the 'Imagine' endpoint and receive a task ID.
Creating a new POST request for the 'Fetch' endpoint to retrieve images.
How to replace the task ID in the 'Fetch' request with the one obtained earlier.
The successful retrieval of image URLs and viewing the generated images.
Final steps to get started with the Midjourney API using go API in minutes.
Encouragement to like, subscribe, and follow for more API-related content.