Morse Fetch API
The Fetch API from Morse — 1 operation(s) for fetch.
The Fetch API from Morse — 1 operation(s) for fetch.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/trymorse-ai:trymorse-ai-fetch-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Morse Fetch API
version: '1'
description: 'The Morse API serves chat models through an OpenAI-compatible interface. Each request pays with your Morse account''s credits.
Send an API key from the Morse app with every request, in the Authorization header as Bearer sk_morse_..., to https://inference.trymorse.ai, the inference door, where TLS ends inside the enclave. https://api.trymorse.ai serves the Morse app and refuses any key with 403 use_inference_door, or with 404 wrong_host at a path it does not serve; both name the door''s base URL. A key acts for its account and always pays with credits, never with a plan''s included use. One credit is $0.01. GET /v1/models lists prices in micro-dollars, 10,000 to the credit. Keep keys on your server. Browsers on other sites cannot call the API.
All of an account''s keys and its owner''s use of the Morse app share one budget of requests per minute and one limit on requests in flight. The account''s plan sets both. A request refused for either limit carries Retry-After, the number of seconds to wait. A retried POST is a new request, and the API charges it again.
An error reply is JSON in the Error shape, with a stable code. A path the API does not serve returns 404 as plain text, and a wrong method returns 405 as plain text.'
servers:
- url: https://inference.trymorse.ai
security:
- apiKey: []
tags:
- name: Fetch
paths:
/v1/fetch:
post:
operationId: fetch
summary: Read a web page
description: 'Reads one public web page and returns its text. Each call costs 1,000 micros, a tenth of a credit. A failed call costs nothing.
Page reading is not offered to API keys for now: GET /v1/models lists no such model to a key, and a key''s request here gets 404 model_not_found. A Morse app login can still use it.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FetchRequest'
example:
model: parallel-extract
url: https://go.dev/doc/go1.27
responses:
'200':
description: The result.
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
X-Funding:
$ref: '#/components/headers/X-Funding'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
content:
application/json:
schema:
$ref: '#/components/schemas/FetchResult'
example:
object: fetch.result
url: https://go.dev/doc/go1.27
title: Go 1.27 Release Notes
published: null
content: '# Go 1.27 Release Notes
...'
truncated: true
'400':
description: The request is malformed.
x-error-codes:
- code: invalid_request_body
when: The body is not a JSON object, a field has the wrong JSON type, or model is missing.
- code: invalid_parameter
when: A field has a value the endpoint refuses. The message names the field.
- code: duplicate_json_key
when: A JSON object in the body repeats a key.
- code: invalid_url
when: url is missing, or not an http or https URL of at most 2,048 characters on a public host and the default port.
- code: privacy_floor_unmet
when: The model's tier is below the API key's min_privacy. param is key.min_privacy, and the message names both tiers. GET /v1/models lists only the models the key may call. Morse refuses before it calls the model or holds any credit.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: url must be an http or https URL of at most 2048 characters, without credentials, on a public host and the default port, 80, or 443.
type: invalid_request_error
param: null
code: invalid_url
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
'401':
description: The key is missing or wrong.
x-error-codes:
- code: invalid_api_key
when: The Authorization header is missing or not Bearer, the key is unknown or revoked, a token that starts with sk_ is not a whole sk_morse_ key, or the bearer is no Morse key or login token at all, such as another service's API key (sk-proj-...).
- code: api_key_expired
when: The key is past the expiry set on it. Make a new key, or set a later expiry before a key expires.
- code: invalid_token
when: The bearer is shaped as a Morse login token (a JWT) but its signature fails or it has expired. An API key sends the whole sk_morse_ key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: Incorrect API key provided.
type: invalid_request_error
param: null
code: invalid_api_key
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
'402':
description: The account's credits, or what the key's spend limit has left, do not cover the request.
x-error-codes:
- code: insufficient_balance
when: The balance is below the amount the request must hold. While the balance is negative, the API refuses every metered request.
- code: key_spend_limit_reached
when: What the key's spend limit has left in its window is below the amount the request must hold. A limit that resets daily, weekly, or monthly sends Retry-After, the seconds until it resets. A limit that never resets sends none. Raise or remove the limit in the dashboard, and the next request is served.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: The account balance does not cover this request. Add credits from $5 at https://console.trymorse.ai/credits?sheet=add-credits.
type: insufficient_balance
param: null
code: insufficient_balance
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
Retry-After:
$ref: '#/components/headers/Retry-After'
'403':
description: The key's account may not make this request.
x-error-codes:
- code: account_disabled
when: Morse has disabled the key's account.
- code: account_deleted
when: The key's account has been deleted.
- code: account_under_18
when: The account's owner said they are under 18.
- code: ip_not_allowed
when: The key allows requests only from its allowed IPs, and the request came from another address. The message names the address the proxy saw.
- code: sealed_required
when: The key is sealed_only, and the request came unsealed. Send it inside POST /v1/sealed, as the Morse app does.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: This account has been disabled. Contact support.
type: invalid_request_error
param: null
code: account_disabled
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
'404':
description: The model does not exist, or it is not a model for this endpoint.
x-error-codes:
- code: model_not_found
when: No model of this endpoint's type has that name.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: The requested model does not exist.
type: invalid_request_error
param: null
code: model_not_found
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
'408':
description: The request body arrived too slowly.
x-error-codes:
- code: request_timeout
when: The request body did not arrive within one minute.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: The request body did not arrive in time.
type: invalid_request_error
param: null
code: request_timeout
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
'413':
description: The request body is too large.
x-error-codes:
- code: request_too_large
when: The body is over 64 KiB.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: Request body is too large.
type: invalid_request_error
param: null
code: request_too_large
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
'422':
description: Morse could not read the page. The call costs nothing.
x-error-codes:
- code: fetch_failed
when: The provider returned no content for the page.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: The page could not be read.
type: upstream_error
param: null
code: fetch_failed
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
'429':
description: The account is over its rate limit or its concurrency limit. Search and fetch each also allow 30 calls a minute per account. Wait the number of seconds in Retry-After, then retry.
x-error-codes:
- code: rate_limit_exceeded
when: The account used up its requests per minute. All of the account's keys and its owner's use of the Morse app share one budget.
- code: concurrency_limit_exceeded
when: The account already has its maximum number of requests in flight. Retry-After is 1.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: Rate limit reached for this account. Retry after the time in the Retry-After header.
type: requests
param: null
code: rate_limit_exceeded
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
Retry-After:
$ref: '#/components/headers/Retry-After'
'502':
description: The web provider failed.
x-error-codes:
- code: upstream_error
when: The provider failed or did not answer in time.
- code: upstream_unavailable
when: The provider is unavailable right now. Retry later, or choose another model.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: The web provider failed.
type: upstream_error
param: null
code: upstream_error
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
'503':
description: Morse or the provider is busy or unavailable. Retry the request later.
x-error-codes:
- code: service_unavailable
when: Morse could not start the request. Retry it.
- code: server_busy
when: Morse is busy. Retry-After is 1.
- code: upstream_busy
when: The web provider is busy for every Morse account. Retry-After says when to retry.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
message: The web provider is busy. Try again shortly.
type: upstream_error
param: null
code: upstream_busy
headers:
X-Morse-Version:
$ref: '#/components/headers/X-Morse-Version'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
Retry-After:
$ref: '#/components/headers/Retry-After'
tags:
- Fetch
components:
schemas:
FetchRequest:
type: object
required:
- model
- url
additionalProperties: false
properties:
model:
type: string
description: A fetch model's id, such as parallel-extract.
url:
type: string
maxLength: 2048
description: An http or https URL on a public host and the default port, 80 or 443, without credentials. The fragment is dropped.
Error:
type: object
description: Every JSON error reply has this shape. Branch on code, which is stable. The message is for people and can change.
additionalProperties: false
required:
- error
properties:
error:
type: object
additionalProperties: false
required:
- message
- type
- param
- code
properties:
message:
type: string
description: A sentence that says what went wrong and what to do.
type:
type: string
description: The error's family, such as invalid_request_error, insufficient_balance, plan, requests, upstream_error, or server_error. plan means the account's plan does not allow the model, even when credits pay for the request.
param:
type:
- string
- 'null'
description: The field the error is about, or null when the error is about no one field. A field of the request is named by its path in the request body, such as model, messages, provider.max_price, or messages[0].content[1].type, or by its query parameter, such as shape. key.min_privacy and key.privacy_veil name a setting of the API key that refused the request, not a field of the request.
code:
type: string
description: The specific error. Each operation lists the codes it can return.
FetchResult:
type: object
required:
- object
- url
- title
- published
- content
- truncated
properties:
object:
const: fetch.result
url:
type: string
title:
type:
- string
- 'null'
published:
type:
- string
- 'null'
description: YYYY-MM-DD, or null when unknown.
content:
type: string
description: The page's text, often Markdown, at most 12,000 characters.
truncated:
type: boolean
description: Whether the content was cut at 12,000 characters.
headers:
Retry-After:
description: Whole seconds to wait before retrying, at least 1.
schema:
type: integer
minimum: 1
X-Request-Id:
description: An id for this request. Quote it when you contact support about the request. An error that arrives after the request starts carries it too. A request that Morse refuses before it bills anything has no X-Request-Id.
schema:
type: string
X-Morse-Version:
description: The running build. Every reply carries it.
schema:
type: string
X-Funding:
description: What pays for the request. With a key, the value is always credits. A request that Morse refuses before it bills anything has no X-Funding.
schema:
type: string
enum:
- credits
- included
securitySchemes:
anthropicAPIKey:
type: apiKey
in: header
name: x-api-key
description: The same sk_morse_ API key, in the header the Anthropic SDKs send it in. Morse reads it when the request has no Authorization header.
apiKey:
type: http
scheme: bearer
bearerFormat: sk_morse_...
description: An API key from the Morse app. It starts with sk_morse_.