POST
/
api
/
images
curl --request POST \
  --url https://api.gnomy.io/api/images \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "template_id": "<string>",
  "modifications": {}
}'
{
  "status": "success",
  "id": "<string>",
  "image_url": "<string>"
}

Generates an image based on a template and modifications.

Authentication

This endpoint requires an API key for authentication. Include your API key in the request headers using the x-api-key header.

Request Body

{
  "template_id": "string",
  "modifications": {
    // Template-specific modifications
  }
}
FieldTypeRequiredDescription
template_idstringYesThe ID of the template to use for generation
modificationsobjectYesThe modifications to apply to the template

Response

Success Response (200 OK)

{
  "status": "success",
  "id": "string",
  "image_url": "string"
}

Error Response (400 Bad Request)

{
  "error": "templateId must be provided"
}

Error Response (401 Unauthorized)

{
  "error": "Unauthorized"
}

Error Response (403 Forbidden)

{
  "error": "Unauthorized: You do not have access to this template"
}

Error Response (500 Internal Server Error)

{
  "error": "Error message"
}

Example

curl -X POST "https://api.gnomy.io/api/images" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "template_id": "template123",
    "modifications": {
      "text": "Hello World",
      "color": "#FF0000"
    }
  }'

Authorizations

x-api-key
string
header
required

Body

application/json

Template and modifications for image generation

The body is of type object.

Response

200
application/json

Image generated successfully

The response is of type object.

POST
/
api
/
images
curl --request POST \
  --url https://api.gnomy.io/api/images \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "template_id": "<string>",
  "modifications": {}
}'
{
  "status": "success",
  "id": "<string>",
  "image_url": "<string>"
}

Generates an image based on a template and modifications.

Authentication

This endpoint requires an API key for authentication. Include your API key in the request headers using the x-api-key header.

Request Body

{
  "template_id": "string",
  "modifications": {
    // Template-specific modifications
  }
}
FieldTypeRequiredDescription
template_idstringYesThe ID of the template to use for generation
modificationsobjectYesThe modifications to apply to the template

Response

Success Response (200 OK)

{
  "status": "success",
  "id": "string",
  "image_url": "string"
}

Error Response (400 Bad Request)

{
  "error": "templateId must be provided"
}

Error Response (401 Unauthorized)

{
  "error": "Unauthorized"
}

Error Response (403 Forbidden)

{
  "error": "Unauthorized: You do not have access to this template"
}

Error Response (500 Internal Server Error)

{
  "error": "Error message"
}

Example

curl -X POST "https://api.gnomy.io/api/images" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "template_id": "template123",
    "modifications": {
      "text": "Hello World",
      "color": "#FF0000"
    }
  }'

Authorizations

x-api-key
string
header
required

Body

application/json

Template and modifications for image generation

The body is of type object.

Response

200
application/json

Image generated successfully

The response is of type object.