Create an image
Makes images from a prompt, in OpenAI's Images format. With a test key the image is a placeholder and nothing is charged.
Makes images from a prompt, in OpenAI's Images format. With a test key the image is a placeholder and nothing is charged.
apiKeyAuthorizationBearer <token>Your API key, starting with upsky_test_ or upsky_live_.
application/json- body
OpenAI's Images format. Other fields, such as quality or style, are ignored.
model*stringAn image model ID from GET /v1/ai/models?type=image.
1 <= length <= 200prompt*stringWhat to draw.
1 <= length <= 32000n?integerHow many images to make, up to 4. Defaults to 1. Each is charged.
1 <= value <= 4size?stringWidth and height in pixels, such as 1024x1024. Sizes each model supports vary.
^\d{2,5}x\d{2,5}$aspect_ratio?stringWidth to height, such as 16:9, for models that take a ratio instead of a size.
^\d{1,3}:\d{1,3}$seed?integerMakes results repeatable, on models that support it.
response_format?"b64_json"Only b64_json: images are returned as base64, never as links.
"b64_json"[key: string]?unknownThe images.
application/json- response
created*integerSeconds since the epoch.
data*array<>usage*curl -X POST 'https://api.upsky.dev/v1/ai/images/generations' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "prompt": "string", "property1": null, "property2": null}'{ "created": 0, "data": [ { "b64_json": "string" } ], "usage": { "images": 0, "input_tokens": 0, "output_tokens": 0, "total_tokens": 0, "cost": 0 }}Create a chat completion POST
Sends messages to a model and returns its reply, in OpenAI's Chat Completions format. With a test key the reply is canned and nothing is charged.
Create speech POST
Speaks text aloud and returns the audio file. With a test key the audio is a second of silence, as WAV, and nothing is charged.