Getting started
How much of my code has to change?
How much of my code has to change?
Why was my model id refused?
Why was my model id refused?
gpt-4o-mini is not a Hopscotch model id. Ids name the provider
that serves them, so it is openai/gpt-4o-mini. A bare id is refused with 400
and the code model_id_not_pinned rather than being routed to whichever provider
we happen to carry it under. See Models.Which models can I call?
Which models can I call?
GET /v1/models, or browse the Models screen in the dashboard. This site
publishes no model list, because any list written here would be wrong the first
time the catalog changed.Which endpoints are documented?
Which endpoints are documented?
POST /v1/chat/completions, GET /v1/models and GET /v1/models/{id}. Those
are the operations this site documents and the API reference publishes. A path
this site does not document is one we make no promise about, in either
direction. See OpenAI compatibility.Do the official OpenAI SDKs work?
Do the official OpenAI SDKs work?
Features
Does tool calling work?
Does tool calling work?
tools, tool_choice and the tool_calls that come
back all travel unchanged, streamed and not. Nothing is executed on our side. See
Tool calling.Does response_format work?
Does response_format work?
json_schema, translated into Anthropic’s own setting, and refuses json_object
with a 400. Nothing here validates your schema or the reply against it. See
Structured outputs.Can I send images?
Can I send images?
How do I know whether a model supports something?
How do I know whether a model supports something?
yes, no or
unknown. Read unknown as “nobody has established this” rather than as “no”.
See Model capabilities.Does prompt caching work?
Does prompt caching work?
Can I set a fallback order across models?
Can I set a fallback order across models?
provider/model lines,
requested as profile/{identifier} in the model field. See
Routing profiles.Can I pin which provider serves a request?
Can I pin which provider serves a request?
Is there an embeddings endpoint?
Is there an embeddings endpoint?
POST /v1/embeddings is refused with a 404 not_found_error.
POST /v1/completions, the legacy text completion body, is a separate matter;
see Completions and embeddings.How soon do new models appear?
How soon do new models appear?
GET /v1/models is
always current, so ask it rather than assuming. See Models.Can I call Anthropic's Messages API through Hopscotch?
Can I call Anthropic's Messages API through Hopscotch?
POST /v1/messages takes the Anthropic Messages body and reads the key
from either x-api-key or Authorization: Bearer, so the Anthropic SDKs work
with two settings changed. Refusals that come from us are shaped as the OpenAI
error envelope, which is the one departure. See
Anthropic Messages API.Can I limit what a key may do beyond its credit limit?
Can I limit what a key may do beyond its credit limit?
What about images, audio and video?
What about images, audio and video?
endpoint_not_supported and nothing is charged.
Images, audio and video says what is
coming and how it will be priced.Billing and credits
Is there a markup on requests?
Is there a markup on requests?
Why did my request return 402?
Why did my request return 402?
code says which. Nothing is charged for the
refusal. See Errors.What is the difference between the 429 codes?
What is the difference between the 429 codes?
rate_limit_exceeded is your key’s request rate, and it carries Retry-After.
spend_rate_exceeded is your account spend rate cap, which also carries
Retry-After, and the lever for it is
sending max_tokens. See
Rate limits and spend controls.Why does sending max_tokens help?
Why does sending max_tokens help?
max_tokens the
ceiling is the model’s published maximum output, so the request occupies more of
your spend rate cap while it is in flight. The hold comes back in full at
settlement either way. See Request parameters.Where do I see what a request actually cost?
Where do I see what a request actually cost?
usage.estimated_cost in a
response body is the provider’s own estimate, passed through. It is not what
Hopscotch charges. See
View activity.Can I use my own provider key?
Can I use my own provider key?
Data and operations
Do you store my prompts and replies?
Do you store my prompts and replies?
Can you show me my API key again?
Can you show me my API key again?
Why are provider rate-limit headers missing?
Why are provider rate-limit headers missing?
x-uniblock-ratelimit-requests-limit, -remaining and -reset headers and,
once exceeded, as a 429 code you can branch on. See
Headers.What should I include when I ask about a request?
What should I include when I ask about a request?
x-hopscotch-request-id and on
x-request-id, and inside every error body as request_id. Quote it rather than
describing the symptom.Do you publish an uptime or latency figure?
Do you publish an uptime or latency figure?
Is the API versioned?
Is the API versioned?
/v1 in the path. The surface grows by
addition, and the error envelope is the stable contract. See
API reference.