Discover available operations
curl --request GET \
--url https://api.dreamlayer.io/v1/capabilities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreamlayer.io/v1/capabilities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dreamlayer.io/v1/capabilities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dreamlayer.io/v1/capabilities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dreamlayer.io/v1/capabilities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dreamlayer.io/v1/capabilities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreamlayer.io/v1/capabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_version": "1",
"key_mode": "test",
"operations": [
"text_to_image"
],
"managed_execute": true,
"server_sent_events": true,
"interactive_questions": true,
"maximum_input_bytes": 20971520,
"maximum_input_dimension": 4096,
"staged_input_uploads": true,
"maximum_source_input_bytes": 209715200,
"supported_input_extensions": [
"<string>"
],
"live_charge_credits_per_image": 1,
"sprite_sheet_credits": 50.05,
"sprite_pricing": {
"minimum_frames": 7,
"maximum_frames": 100,
"default_frames": 12,
"tier_boundary": 14,
"first_tier_cents": 14,
"additional_frame_cents": 7,
"credit_cents": 17,
"charge_rounding": "up_to_tenth",
"plain_frame_cents": 7
},
"test_mode_uses_credits": false
}{
"error": {
"code": "<string>",
"reason": "invalid_request",
"message": "<string>",
"category": "<string>",
"retryable": true,
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {}
}
}{
"error": {
"code": "<string>",
"reason": "invalid_request",
"message": "<string>",
"category": "<string>",
"retryable": true,
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {}
}
}{
"error": {
"code": "RATE_LIMITED",
"reason": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"category": "RATE_LIMITED",
"retryable": true,
"request_id": "d34db33f-0000-4000-8000-000000000001"
}
}API Reference
Discover available operations
Read the operations and pricing available to the authenticated key. Does not start generation.
GET
/
v1
/
capabilities
Discover available operations
curl --request GET \
--url https://api.dreamlayer.io/v1/capabilities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreamlayer.io/v1/capabilities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dreamlayer.io/v1/capabilities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dreamlayer.io/v1/capabilities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dreamlayer.io/v1/capabilities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dreamlayer.io/v1/capabilities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreamlayer.io/v1/capabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"api_version": "1",
"key_mode": "test",
"operations": [
"text_to_image"
],
"managed_execute": true,
"server_sent_events": true,
"interactive_questions": true,
"maximum_input_bytes": 20971520,
"maximum_input_dimension": 4096,
"staged_input_uploads": true,
"maximum_source_input_bytes": 209715200,
"supported_input_extensions": [
"<string>"
],
"live_charge_credits_per_image": 1,
"sprite_sheet_credits": 50.05,
"sprite_pricing": {
"minimum_frames": 7,
"maximum_frames": 100,
"default_frames": 12,
"tier_boundary": 14,
"first_tier_cents": 14,
"additional_frame_cents": 7,
"credit_cents": 17,
"charge_rounding": "up_to_tenth",
"plain_frame_cents": 7
},
"test_mode_uses_credits": false
}{
"error": {
"code": "<string>",
"reason": "invalid_request",
"message": "<string>",
"category": "<string>",
"retryable": true,
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {}
}
}{
"error": {
"code": "<string>",
"reason": "invalid_request",
"message": "<string>",
"category": "<string>",
"retryable": true,
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {}
}
}{
"error": {
"code": "RATE_LIMITED",
"reason": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"category": "RATE_LIMITED",
"retryable": true,
"request_id": "d34db33f-0000-4000-8000-000000000001"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Closed public capability contract
Allowed value:
"1"Available options:
test, live Available options:
text_to_image, image_to_image, background_remove, upscale, sprite_sheet Rounded charge for the default twelve frames.
Required range:
0.1 <= x <= 100Show child attributes
Show child attributes