GenMagic Images API
The Images API from GenMagic — 2 operation(s) for images.
The Images API from GenMagic — 2 operation(s) for images.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/genmagic:genmagic-images-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: GenMagic Images API
version: 1.0.0
description: 'GenMagic is one studio for every generative AI model. Turn a single prompt into text, images, video, audio, music, or code, and route it to the best model automatically. New models the day they launch.
OpenAI-compatible REST API plus a remote Model Context Protocol server at /api/mcp (Streamable HTTP, protocol 2025-06-18). Authenticate with an API key minted at https://genmagic.co/get-api-key; the model catalog (GET /api/v1/models) also answers without one. Billed pay-as-you-go against a prepaid USD balance; cost and remaining balance are returned in response headers.'
servers:
- url: https://genmagic.co
security:
- bearerAuth: []
tags:
- name: Images
paths:
/api/v1/images/generations:
post:
operationId: createImage
summary: OpenAI-compatible image generation and edit
description: 'Generate an image from a prompt, or transform a reference image (image-to-image) by passing image. Set type=logo to steer as a brand mark. On-brand automatically when personalization is on. Returns { created, model, data: [{ url }] } (or b64_json), where model is the model that made the image, also when you left model out.'
security:
- bearerAuth: []
responses:
'200':
description: Success.
headers:
X-RateLimit-Limit:
schema:
type: string
description: The key's request quota for the current rate-limit window.
X-RateLimit-Remaining:
schema:
type: string
description: Requests left for this key in the current rate-limit window.
X-RateLimit-Reset:
schema:
type: string
description: Seconds until the current rate-limit window resets.
X-Cost-Cents:
schema:
type: string
description: What this call cost, in US cents (may be fractional). Provider-authoritative when the provider reports a cost, else the metered estimate. Omitted when the cost is unknown or deliberately not disclosed (the OpenAI-compatible chat passthrough hides it).
X-Credits-Remaining:
schema:
type: string
description: The key owner's prepaid balance in US cents remaining after this call. Omitted when the balance cannot be read.
X-Brand-Fit:
schema:
type: string
enum:
- on_brand
- wrong_palette
- monochrome
description: The generated visual artifact's brand-color verdict. Present only when the output could be measured and the brand has a chromatic palette; an agent can regenerate a `wrong_palette` result to close the on-brand loop. Omitted for prose, code, and unbranded generations.
'401':
description: 'authentication_error: missing or invalid API key.'
'402':
description: 'insufficient_quota: credit balance would go negative.'
'429':
description: 'rate_limit_error: over 300 requests/minute for this key.'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- prompt
properties:
prompt:
type: string
description: Description of the image (or the edit to make when image is given).
model:
type: string
description: Model id. Omit for the recommended default.
size:
type: string
enum:
- 1024x1024
- 1792x1024
- 1024x1792
description: Output size.
image:
type: string
description: 'Reference image to transform: an https URL or a data:image URL.'
type:
type: string
enum:
- image
- logo
description: logo steers a brand mark; image is a picture.
response_format:
type: string
enum:
- url
- b64_json
description: Return a hosted url (default) or base64.
n:
type: integer
description: Number of images (1-4).
tags:
- Images
/api/v1/images/edits:
post:
operationId: editImage
summary: OpenAI-compatible image edit (upload a picture)
description: 'OpenAI''s image edit call, so client.images.edit in the OpenAI SDKs and apps built on them work unchanged: upload the picture as the image file and describe the change in prompt. The same engine, price and response as /images/generations with a reference image. A JSON body with image as an https or data:image URL also works. Masks are refused (describe the change in the prompt instead).'
security:
- bearerAuth: []
responses:
'200':
description: Success.
headers:
X-RateLimit-Limit:
schema:
type: string
description: The key's request quota for the current rate-limit window.
X-RateLimit-Remaining:
schema:
type: string
description: Requests left for this key in the current rate-limit window.
X-RateLimit-Reset:
schema:
type: string
description: Seconds until the current rate-limit window resets.
X-Cost-Cents:
schema:
type: string
description: What this call cost, in US cents (may be fractional). Provider-authoritative when the provider reports a cost, else the metered estimate. Omitted when the cost is unknown or deliberately not disclosed (the OpenAI-compatible chat passthrough hides it).
X-Credits-Remaining:
schema:
type: string
description: The key owner's prepaid balance in US cents remaining after this call. Omitted when the balance cannot be read.
'401':
description: 'authentication_error: missing or invalid API key.'
'402':
description: 'insufficient_quota: credit balance would go negative.'
'429':
description: 'rate_limit_error: over 300 requests/minute for this key.'
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- image
- prompt
properties:
image:
type: string
format: binary
description: The picture to edit, as an uploaded file (the first one is used when several are sent).
prompt:
type: string
description: The edit to make.
model:
type: string
description: Model id. Omit for the recommended default.
size:
type: string
enum:
- 1024x1024
- 1792x1024
- 1024x1792
description: Output size.
response_format:
type: string
enum:
- url
- b64_json
description: Return a hosted url (default) or base64.
n:
type: integer
description: Number of images (1-4).
tags:
- Images
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'GenMagic API key in the form gm_live_..., sent as Authorization: Bearer <key>. Also accepted as x-api-key.'