🤝 New Partnership: Weather Trends International joins Spartera to deliver predictive weather analytics Read the Announcement →
Hero Background

Creating Your First AI Asset

From trained model to monetized predictions in under a day

Your proprietary ML model is valuable intellectual property. Spartera's External API Connector lets you monetize predictions from any model — without sharing weights, training data, or infrastructure. Keep full control. Start earning immediately.

100%
IP Protected
< 1 Day
Time to Revenue
Zero
Model Movement
15 min read
For Sellers
Overview

Why Sell Predictions Instead of Models?

Most data scientists and ML teams face the same dilemma: you've invested months training a high-value model, but the only monetization options — publishing to model hubs, licensing weights, or consulting — either give away your IP or don't scale. Spartera's External API Connector introduces a third path: sell the predictions, not the model. Your model stays on your infrastructure. Buyers get real-time predictions through the Spartera Marketplace. You earn per prediction with zero IP exposure.

Key Points

Model weights and training data never leave your servers

Buyers discover and purchase predictions through the Spartera Marketplace

You set your own price per prediction and keep 100% of it

Works with any framework: TensorFlow, PyTorch, scikit-learn, XGBoost, custom

Works on any cloud: GCP, AWS, Azure, or your own servers

Spartera handles marketplace discovery, authentication, billing, and delivery

Why It Matters

Why Monetize Predictions Instead of Sharing Models

The economics and security of selling inferences

Total IP Protection

Publishing a model to HuggingFace or licensing weights means your IP is out of your hands forever. Competitors can fine-tune, reverse-engineer, or redistribute. With prediction monetization, your model architecture, weights, and training data never leave your infrastructure — buyers only see inputs and outputs.

Recurring Revenue vs. One-Time Sales

Licensing a model is a one-time transaction. Selling predictions creates usage-based recurring revenue that grows as buyers scale. A model licensed for $50K generates $50K. That same model serving 10,000 predictions per month at $2 each generates $240K per year — and grows with demand.

Serve Unlimited Customers from One Deployment

Without Spartera, monetizing a model means managing API keys, billing, contracts, and support for every customer. With the External API Connector, you maintain a single deployment. Spartera handles customer acquisition, authentication, credit billing, and delivery. You serve 10 or 10,000 buyers with zero additional operations.

Continuous Improvement Without Disruption

When you sell predictions via API, you can retrain and update your model at any time without disrupting buyers. They call the same Spartera endpoint and get better results. Try doing that when someone downloaded your model six months ago — they're stuck on the old version forever.

How It Works

End-to-End: From Model to Marketplace

Four phases to your first earning prediction

1
1

Train Your Model (Hello World)

Start with a trained model in any ML framework. For this guide, we'll walk through a simple scikit-learn classifier, but the same approach works for TensorFlow, PyTorch, XGBoost, or any framework that can produce predictions programmatically.

Key Points:

Train a model using your framework of choice (scikit-learn, TensorFlow, PyTorch, etc.)
Save/serialize the trained model (pickle, joblib, SavedModel, ONNX)
Validate predictions locally before deploying
Example: A salary prediction model trained on age, education level, years of experience, and gender
Hello World tip: Start with scikit-learn + joblib — simplest path from notebook to production
2
2

Deploy as a REST API Endpoint

Wrap your model in a web service that accepts JSON input and returns predictions. You have two main paths: GCP Cloud Run for managed, auto-scaling deployment, or a generic Flask/FastAPI server on any cloud or VPS.

Key Points:

Option A — GCP Cloud Run (recommended): Containerize with Docker, deploy with 'gcloud run deploy', get auto-scaling HTTPS endpoint in minutes
Option B — Generic Flask/FastAPI: Run on any server (AWS EC2, Azure VM, DigitalOcean, on-prem), manage SSL and scaling yourself
Your endpoint must accept POST requests with JSON body
Spartera sends this POST structure: {"asset_id": "...", "testmode": true/false, "function_id": "...", "params": {your input fields}}
Your endpoint must return: {"answer_value": your prediction result}
Secure with an API key passed via HTTP header (recommended), URL parameter, or request body
3
3

Create a Connection in Spartera

Register your API endpoint as a data connection in the Spartera Seller Portal. This tells Spartera where your model lives and how to authenticate requests — without ever accessing your model directly.

Key Points:

Log in to app.spartera.com and navigate to Connections
Select 'External API' as the Storage Engine (engine_id 20)
Enter your API endpoint URL (must be HTTPS)
Select HTTP method: POST (recommended for model inference)
Configure API Key authentication: choose location (HEADER recommended), parameter name (e.g., X-API-Key), and key value
Test the connection — Spartera will ping your endpoint to confirm it's reachable and responding correctly
Your API key is stored securely in GCP Secret Manager — Spartera never exposes it
4
4

Create an Asset and Publish to Marketplace

An asset is the marketplace listing that buyers discover and purchase. It defines the model's input parameters (schema), pricing, and metadata. Once published, buyers can get predictions through the marketplace form or via API — with zero knowledge of your backend.

Key Points:

Navigate to Assets and create a new asset linked to your External API connection
Define input schema: the parameters buyers must provide (e.g., age, education_level, years_experience, gender)
Set asset type to CALCULATION (Spartera routes this correctly for External API inference)
Set pricing using Spartera's credit system — you keep 100% of the price you set
Optionally assign a function_id if your single endpoint serves multiple models (e.g., 'predict_salary', 'predict_churn')
Use the Test button to validate end-to-end: Spartera → your API → prediction returned
Publish to Marketplace — buyers can now discover and purchase predictions immediately
Key Benefits

Why Build AI Assets on Spartera

100%

IP Protection

Model weights, architecture, and training data never leave your infrastructure

< 1 Day

Time to Revenue

Go from trained model to earning predictions in hours, not months

Zero

Operations Overhead

Spartera handles discovery, authentication, billing, and customer support

Unlimited

Customer Scale

Serve unlimited marketplace buyers from a single model deployment

FAQs

Common Questions

What ML frameworks are supported?

Any framework that can produce predictions. scikit-learn, TensorFlow, PyTorch, XGBoost, LightGBM, Keras, ONNX, custom code — if it can run behind a REST API and return JSON, it works with Spartera. The External API Connector is framework-agnostic.

Where can I host my model?

Anywhere with an HTTPS endpoint. GCP Cloud Run, AWS Lambda, Azure Functions, AWS EC2, Google Compute Engine, DigitalOcean, Heroku, Render, your own data center — even a Raspberry Pi if it has a public HTTPS URL. Spartera is cloud-agnostic.

Can buyers see my model's code, weights, or training data?

No. Buyers only see the marketplace listing (input parameters, description, pricing) and the prediction output. Your model weights, architecture, training data, and infrastructure are completely invisible. Spartera only sends structured requests and receives the answer_value response.

How does billing work? What does Spartera charge?

You set a credit price per prediction. Buyers purchase credits and spend them on predictions. You keep 100% of the price you set. Spartera earns by selling credits at a markup to buyers. There are no listing fees, monthly charges, or revenue sharing from your set price.

Can I serve multiple models from one API endpoint?

Yes, using function_id routing. Deploy one endpoint, create separate Spartera assets with different function_id values (e.g., 'predict_salary', 'predict_churn'). Your endpoint reads the function_id and dispatches to the correct model. Each asset gets its own marketplace listing and pricing.

What happens if my model endpoint goes down?

Spartera returns an error to the buyer and classifies it as a seller-side issue (5xx). Buyers are not charged credits for failed predictions. We strongly recommend implementing health checks, uptime monitoring, and setting Cloud Run min-instances to 1+ to avoid cold start downtime.

Can I update my model without disrupting buyers?

Yes — this is a key advantage of prediction monetization. Retrain your model, redeploy your endpoint, and buyers automatically get predictions from the updated model. No versioning headaches, no buyer migration, no re-downloads. The Spartera asset and marketplace listing remain unchanged.

Do I need to write any Spartera-specific code?

Minimal. Your endpoint just needs to: (1) parse the Spartera POST body (asset_id, testmode, function_id, params), (2) run your model on the params, and (3) return {"answer_value": result}. That's roughly 10-20 lines on top of your existing model serving code.

What's the difference between an External API asset and a database-backed asset?

Database-backed assets run SQL queries against a connected data warehouse (BigQuery, Snowflake, etc.) and return aggregate analytics. External API assets forward requests to your custom API endpoint and return whatever your model computes. Both appear the same to marketplace buyers — the difference is entirely in the backend processing.

How fast does my API need to respond?

Aim for under 5 seconds. Most buyer requests come through the marketplace web form, where 1-3 second response times feel responsive. For API-to-API integrations, sub-second is ideal. Spartera will timeout and return an error to the buyer after approximately 30 seconds.

Still have questions?

Contact Us

Stay Ahead of the Analytics Revolution

Get insights on Analytics as a Service trends, platform updates, and success stories

We respect your privacy. Unsubscribe at any time.

Continue Learning

Related Topics

Deepen your understanding with these related guides

Explore more guides and tutorials

Browse All Topics

Ready to Monetize Your Model?

Your model is already trained. You're 30 minutes away from earning your first dollar on predictions.

No credit card required
5 minute setup
Enterprise security