GPT Image 2 High API

Image generation via Echo, billed by actual USD cost per request

Text to ImageImage

Provider

OpenAI

Billing

Provider cost

ScalingTensor price

Provider cost USD / image; actual cost from Echo usage API

Playground

Try GPT Image 2 High

Edit the params, add your API key and run the model here. The result plays on this page when the job completes.

Input

Used for this request only and never stored. Get a key

Running a request charges your wallet: Provider cost USD / image; actual cost from Echo usage API.

Output

preview

Request summary

Endpoint
POST /api/media/generate
Model ID
gpt-image-2-high
n
1
size
1024x1024
prompt
A Shiba Inu walking along the seaside at dusk
quality
high
response_format
url

Need job lookups or the raw response? Open the full playground.

Pricing

GPT Image 2 High API pricing

Prices come from the live catalog. There is no subscription; each request is charged to your prepaid wallet.

ScalingTensor price

Provider cost

Live catalog price

Provider cost

USD / image; actual cost from Echo usage API

Compare all model prices

Shared balance

Add credits

Top up

One wallet and one API key for every model in the catalog. Top-ups start at $10 and are paid through Stripe.

Parameters

Input parameters

These parameters belong inside the request body's params object.

Input parameters
nametyperequireddescription
promptstringtrueDescribe the image to generate. Put these fields in params when calling /api/media/generate, with the top-level model set to gpt-image-2-high.
sizestringfalseDefault: 1024x1024. Allowed values: 1024x1024, 1536x1024, 1024x1536.
nintegerfalseNumber of images. Only 1 is supported; default: 1.
qualitystringtrueMust be high, matching the model suffix. The model and quality must always specify the same tier.
response_formatstringfalseFixed url.

Output fields

Output fields
nametypedescription
data[0].b64_jsonstringBase64-encoded PNG image. Decode it to save the generated image.

API

Call GPT Image 2 High from your code

Create a key in the console and call the API from your server using the apiKey header. Save data.jobId and poll GET /api/media/result?jobId=... with the same key; a code of 0 means success.

POST /api/media/generate
curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
  --header 'apiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "model": "gpt-image-2-high",
  "params": {
    "n": 1,
    "size": "1024x1024",
    "prompt": "A Shiba Inu walking along the seaside at dusk",
    "quality": "high",
    "response_format": "url"
  }
}'
const response = await fetch("https://restapi.scalingtensor.com/api/media/generate", {
  method: "POST",
  headers: {
    apiKey: process.env.SCALINGTENSOR_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "gpt-image-2-high",
    "params": {
      "n": 1,
      "size": "1024x1024",
      "prompt": "A Shiba Inu walking along the seaside at dusk",
      "quality": "high",
      "response_format": "url"
    }
  }),
});

const result = await response.json();
if (!response.ok || result.code !== 0) {
  throw new Error(result.msg || `Request failed: ${response.status}`);
}
console.log(result.data); // Save data.jobId to query /api/media/result
import os
import requests

payload = {
    "model": "gpt-image-2-high",
    "params": {
        "n": 1,
        "size": "1024x1024",
        "prompt": "A Shiba Inu walking along the seaside at dusk",
        "quality": "high",
        "response_format": "url",
    },
}

response = requests.post(
    "https://restapi.scalingtensor.com/api/media/generate",
    headers={"apiKey": os.environ["SCALINGTENSOR_API_KEY"]},
    json=payload,
    timeout=60,
)
result = response.json()
if result["code"] != 0:
    raise RuntimeError(result["msg"])
print(result["data"])  # Save data["jobId"] to query /api/media/result

API documentation · This page as Markdown · Markdown API reference

Related models

GPT Image 2 High API FAQ

How much does the GPT Image 2 High API cost?

GPT Image 2 High is billed at the provider's actual cost for each job (USD / image; actual cost from Echo usage API). The charge is deducted from your prepaid ScalingTensor wallet.

How do I call the GPT Image 2 High API?

Send POST /api/media/generate with "model": "gpt-image-2-high" and the parameters in a params object, using your apiKey header. The call returns a jobId. Poll GET /api/media/result?jobId=... until the status is completed, then read the output URL from the result.

Which parameters does GPT Image 2 High accept?

Required: prompt and quality. Optional: size, n and response_format. The parameter table on this page describes each one.

Do I need a OpenAI account to use GPT Image 2 High?

No. You call GPT Image 2 High with your ScalingTensor API key and pay from your ScalingTensor wallet. The same key works for every other model in the catalog.