OhMyGPT API Docs
  1. Images
OhMyGPT API Docs
  • About This site
  • About new website
  • Midjourney Open API
    • About Midjourney Service
    • Midjourney Blend Image Generation Task Creation
      POST
    • Midjourney Text-to-Image Task Creation
      POST
    • Midjourney Execute Action Task Creation
      POST
    • Midjourney Query Specific Task ID Execution Status
      POST
    • Midjourney Paginated Bulk Query Tasks
      POST
    • Midjourney Describe Prompt Extraction Task Creation
      POST
    • Retrieve Images Generated by Midjourney from Object Storage
      GET
    • Retrieve Compressed Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Retrieve Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Proxy Discord Images via WSRV
      GET
    • Proxy and Compress Discord Images via WSRV
      GET
  • Management API
    • Create a New API Key
      POST
    • Update API Key Information
      POST
    • Query All of User's API Keys
      POST
    • Delete Specified API Key
      POST
    • Query User Membership Expiration Date
      POST
    • User Balance Query
      POST
    • Query the current model rates
      GET
  • OpenAI
    • About OpenAI Compatible API
    • About Azure OpenAI API
    • Audio
      • Text To Speech API
    • Chat
      • Chat Completion
      • Completion (Legacy)
    • Images
      • Create Image
        POST
    • Realtime API
  • Anthropic Claude
    • Deprecated
      • ChatCompletions
      • Claude2 API
    • Anthropic Official Claude API
  • Policies
    • Terms of Service
    • Privacy Policy
  • Other OpenAPIs
    • Search API
      • Google Custom Search API
      • Google Search By Serper
    • Azure API
      • Get Azure TTS voice list
      • Azure TTS
  1. Images

Create Image

Developing
POST
/v1/images/generations
For more details, go to: https://platform.openai.com/docs/api-reference/images/create

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/x-www-form-urlencoded
prompt
string 
optional
Example:
A cute anime girl
model
string 
optional
Example:
dall-e-3
n
string 
optional
Example:
1
quality
string 
optional
Example:
hd
response_format
string 
optional
Example:
url
size
string 
optional
Example:
1024x1024
style
string 
optional
Example:
vivid

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ohmygpt.com/v1/images/generations' \
--data-urlencode 'prompt=A cute anime girl' \
--data-urlencode 'model=dall-e-3' \
--data-urlencode 'n=1' \
--data-urlencode 'quality=hd' \
--data-urlencode 'response_format=url' \
--data-urlencode 'size=1024x1024' \
--data-urlencode 'style=vivid'

Responses

🟢200OK
application/json
Body
object {0}
Example
{
    "created": 1699693501,
    "data": [
        {
            "revised_prompt": "An adorable anime-style depiction of a girl. She has bright, expressive eyes, and long, flowing hair. Her outfit is a traditional seifuku school uniform with a sailor collar, pleated skirt, and knee-high socks. She is emanating positivity, with a wide smile on her face and cheerful, sparkling eyes. The color palette is soft and pastel, with a blend of soothing blues, gentle pinks, and calming whites. The background is filled with cherry blossom petals gently floating in the wind, adding a serene, peaceful atmosphere to the overall scene.",
            "url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-EDfhgsr4pmhirnnOUk3lXiHM/user-GSu4YoazFbISNTWmskEcrxQ5/img-lR4i8UJMvYeODOOebmRupWgO.png?st=2023-11-11T08%3A05%3A01Z&se=2023-11-11T10%3A05%3A01Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2023-11-10T21%3A40%3A03Z&ske=2023-11-11T21%3A40%3A03Z&sks=b&skv=2021-08-06&sig=Xwu5fpx7c0067pEZzT2ZxQYzahYdofmb0VCyoXVlzH8%3D"
        }
    ]
}
Previous
Completion (Legacy)
Next
Realtime API
Built with