Run your first model

This example shows how to invoke an image-based model using the Norman SDK. You provide an input image, and the model returns the processed output as raw bytes.

See all available models in the Models Library.

from norman import Norman

# Initialize the SDK with your API key
norman = Norman(api_key="nrm_sk_2a96b7b1a9f44b09b7c3f9f1843e93e2")

# Define the invocation configuration
invocation_config = {
    "model_name": "image_reverser_model",
    "inputs": [
        {
            "display_title": "Input",
            "data": "/Users/alice/Desktop/sample_image.png"
        }
    ]
}

# Invoke the model
response = await norman.invoke(invocation_config)
Example Response
{
  "output_image": <bytes>

Response Structure

Root object (dict):

  • output_image (bytes) — Binary output data representing the model’s generated result.

For image models, this contains the image bytes.
For text or audio models, it contains the corresponding binary data.

Accessing the Output

You can display, or save the output, for example:

from io import BytesIO
from PIL import Image

data = response["output_image"]

# Open and display the image
img = Image.open(BytesIO(data))
img.show(title="output_image - Memory")

# Optionally save it to disk
img.save("test_memory_output_image.png")

·

©

2026

·

©

2026