Ana içeriğe geç
stepfun-ai avatarı

GOT-OCR 2.0 API

stepfun-ai/got-ocr/v2

Görsellerdeki metni çıkarın — belgeler, sahne metinleri, tablolar, formüller, grafikler ve notalar — her görsel için tanınan metin tek bir string olarak döner; isterseniz biçimlendirilmiş Markdown/LaTeX olarak.

0.05

Model girdisi

Input

  • https://images.unsplash.com/photo-1586339949216-35c2747cc36d?w=800

URLs of the image(s) to extract text from.

Additional Settings

Customize your input with more control.

Return the recognized text in formatted (Markdown/LaTeX) mode.

You need to be logged in to run this model and view results.
Log in

Model çıktısı

Output

https://media.modelrunner.ai/Gvh0nmfEW4k3e7CUZ22B8.octet-stream

Generated in 3.534 seconds
Logs (1 lines)

Örnek istekler

Örnekler

Example output 1Example output 2

GOT-OCR 2.0 API

GOT-OCR 2.0 is a image-to-text AI model by stepfun-ai. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at $0.05 per response.

POST https://queue.modelrunner.run/stepfun-ai/got-ocr/v2

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/stepfun-ai/got-ocr/v2 \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "do_format": false,
    "input_image_urls": [
      "https://images.unsplash.com/photo-1586339949216-35c2747cc36d?w=800"
    ],
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/stepfun-ai/got-ocr/v2/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/stepfun-ai/got-ocr/v2/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("stepfun-ai/got-ocr/v2", {
  input: {
    "do_format": false,
    "input_image_urls": [
      "https://images.unsplash.com/photo-1586339949216-35c2747cc36d?w=800"
    ]
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/stepfun-ai/got-ocr/v2",
    headers=headers,
    json={
      "do_format": false,
      "input_image_urls": [
        "https://images.unsplash.com/photo-1586339949216-35c2747cc36d?w=800"
      ]
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

Input parameters of GOT-OCR 2.0
NameTypeRequiredDescription
input_image_urlsarrayyesURLs of the image(s) to extract text from.
do_formatbooleannoReturn the recognized text in formatted (Markdown/LaTeX) mode. Default: false.

Machine-readable: OpenAPI schema · llms.txt

Use GOT-OCR 2.0 from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and GOT-OCR 2.0 becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint stepfun-ai/got-ocr/v2.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run stepfun-ai/got-ocr/v2 on ModelRunner to generate text”. MCP setup guide.

Model Detayları

Model Detayları

GOT-OCR 2.0, görsellerdeki metni okur. Bir ya da daha fazla görsel URL’si verin; model tanınan metni her görsel için bir string olarak döndürür. Basılı belgeleri, el yazısını ve sahne metinlerini olduğu kadar tablolar, matematik formülleri, grafikler ve notalar gibi yapılandırılmış içeriği de kapsar. Güçlü yanı, pek çok içerik türünde genel amaçlı optik karakter tanımayı tek bir modelde toplamasıdır: sıradan OCR düz metinde kalırken GOT-OCR 2.0, yerleşim bilgisi taşıyan ve yoğun notasyon içeren materyali de çıkarır. Sonucu Markdown/LaTeX olarak almak için biçimlendirme modunu açın; böylece tablolar ve denklemler düz bir karakter dizisi olarak değil, yapıları bozulmadan gelir.

## En uygun olduğu işler - Taranmış ya da fotoğrafı çekilmiş belgelerden ve fişlerden metni çıkarmak - Doğal fotoğraflardaki sahne metinlerini ve tabelaları okumak - Tabloları, matematik formüllerini ve grafikleri yapılandırılmış Markdown/LaTeX olarak çıkarmak (`do_format` alanını true yapın) - Notaları ve yoğun notasyon içeren diğer görselleri yazıya dökmek - Tek bir çağrıda bir dizi görsel üzerinde toplu OCR — her görsel kendi metin string’ini verir

## Şu durumlarda başka bir model seçin - Tanınan metni yalnızca çıkarmak değil, çevirmek ya da özetlemek istiyorsanız — OCR sonrasında bir metin modeli kullanın - Kelime düzeyinde bounding box’lar ya da hassas yerleşim koordinatları gerekiyorsa — bu model konum geometrisi değil, metin döndürür - Girdiniz görsel değil de ses ya da videoysa — bir speech-to-text ya da video modeli kullanın

## İpuçları - Her sayfayı ya da fotoğrafı `input_image_urls` içinde ayrı bir öğe olarak verin; çıktı dizisi, tanınan metni her görsel için bir string olacak şekilde, sırasıyla döndürür. - Görselde tablo, denklem ya da nota varsa ve Markdown/LaTeX yapısının korunmasını istiyorsanız `do_format` alanını true yapın; düz bir dökümün yeterli olduğu sade metinlerde false bırakın. - Net, iyi aydınlatılmış ve makul ölçüde yüksek çözünürlüklü görseller kullanın — bulanıklık, parlama ve eğiklik tanıma doğruluğunu düşürür.

## Gelişmiş Yapılandırma - `do_format` (boolean, varsayılan `false`): `true` olduğunda tanınan metin biçimlendirilmiş modda (Markdown/LaTeX) döner ve tabloların, matematik ve müzik notasyonunun yapısı korunur. Düz metin dökümü için `false` bırakın.

ModelRunner JavaScript client ile çalıştırmak için: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("stepfun-ai/got-ocr/v2", { input: { input_image_urls: [ "https://media.modelrunner.ai/example-document.png" ], do_format: true, }, }); ```