roberthein/modelname-new - AI Model Hubs Tool
Overview
modelname-new is a public model hosted by user roberthein on Replicate. The Replicate model page serves primarily as an API reference and playground: it exposes a web-based playground for iterative testing, an API reference (OpenAPI/schema) for programmatic use, example runs, and a versions history. Replicate’s page notes the model is open-source and can be run locally with Docker, but the model listing itself does not include a README or extended documentation, so consumers should inspect the model’s OpenAPI/schema before integrating. (Replicate model page: https://replicate.com/roberthein/modelname-new). On Replicate the listing reports about 233 runs, runs on Nvidia H100 hardware, and typical predictions complete in ~19 seconds. Replicate also shows an approximate cost of $0.029 per run (about 34 runs per USD), with the usual caveat that actual cost depends on inputs and runtime. The model has an explicit versions page and a specific version (ID shown on the versions view) that can be selected when creating predictions; you can programmatically fetch the model/version OpenAPI schema via Replicate’s HTTP API to learn exact input and output fields before calling the prediction endpoint (see Replicate OpenAPI docs for examples).
Key Features
- Web playground for iterative, interactive testing of model prompts and parameters
- Public API reference and OpenAPI/schema accessible via Replicate for programmatic integration
- Version history allowing selection of a specific model version for reproducible runs
- Replicate-hosted execution on Nvidia H100 with reported ~19s prediction latency
- Approximate per-run cost reported by Replicate (~$0.029); model listed as runnable locally via Docker
- Examples shown on the model page; minimal README on the listing, so inspect the schema before use
Example Usage
Example (python):
import os
import requests
# Set your Replicate API token in the environment: REPLICATE_API_TOKEN
TOKEN = os.environ.get("REPLICATE_API_TOKEN")
if not TOKEN:
raise RuntimeError("Set REPLICATE_API_TOKEN environment variable")
headers = {
"Authorization": f"Token {TOKEN}",
"Content-Type": "application/json",
}
# 1) Fetch model metadata (including latest version and OpenAPI schema)
model_url = "https://api.replicate.com/v1/models/roberthein/modelname-new"
model_info = requests.get(model_url, headers=headers).json()
latest_version = model_info.get("latest_version")
print("Latest version metadata keys:", list(latest_version.keys() if latest_version else []))
# If the model exposes an OpenAPI schema, inspect the Input shape before sending a prediction
openapi_schema = latest_version.get("openapi_schema") if latest_version else None
if openapi_schema:
input_props = openapi_schema.get("components", {}).get("schemas", {}).get("Input", {}).get("properties")
print("Model input properties:", input_props)
else:
print("No openapi_schema found on the model listing. Check the Replicate model page.")
# 2) Create a prediction (replace the input dict with fields from the model's schema)
# Note: 'version' should be the version id string (e.g. latest_version["id"]).
if latest_version and latest_version.get("id"):
prediction_payload = {
"version": latest_version["id"],
"input": {
# Example placeholder. Replace with actual fields from input_props, e.g. "prompt": "Hello"
"prompt": "Hello, world"
}
}
pred = requests.post("https://api.replicate.com/v1/predictions", headers=headers, json=prediction_payload).json()
print("Prediction created:", pred)
# Poll prediction URL in pred['urls'] or pred['id'] to get final outputs per Replicate API docs.
else:
print("No usable version id found; confirm the model name and permissions.")
# For quick runs you can also use the replicate Python client: replicate.run("owner/model:version", input={...})
# but always check the model's input schema first to avoid malformed requests. Pricing
Replicate reports an approximate cost of $0.029 per run for this model (about 34 runs per USD). Actual cost on Replicate varies with input size, execution time, and hardware; the listing also indicates the model can be run locally via Docker, allowing self-hosting to avoid Replicate runtime charges. Source: https://replicate.com/roberthein/modelname-new
Benchmarks
Approximate cost per run: $0.029 per run (Replicate estimate) (Source: https://replicate.com/roberthein/modelname-new)
Typical prediction latency: ≈19 seconds (on Replicate-hosted H100) (Source: https://replicate.com/roberthein/modelname-new)
Public run count: 233 runs (public page) (Source: https://replicate.com/roberthein/modelname-new)
Latest version timestamp (page): Version listed ~1 year, 4 months ago; model updated ~9 months ago (Source: https://replicate.com/roberthein/modelname-new/versions)
Key Information
- Category: Model Hubs
- Type: AI Model Hubs Tool