Quick start

Create an API key, list available models, and make your first request with the endpoint advertised by the model list.

This guide makes a first request with an OpenAI Chat Completions model. For every other model, follow the protocol metadata returned by GET /v1/models.

Client base URLs

Use the base URL that matches the client's native protocol:

ClientBase URL
Claude Code / Anthropic Messageshttps://hopsapi.com
Codex / OpenAI-compatible clientshttps://hopsapi.com/v1

1. Create an API key

On the console's API Keys page, create a named key (sk-...). The full key is shown only once at creation: copy it immediately to a password manager or secure environment variable. After closing, it cannot be viewed again; the list shows only a masked fingerprint, so a lost key must be replaced.

2. Confirm your balance

An account with no balance can create a key and list models, but paid inference requests return HTTP 402. Check the balance on the console's Overview page and top up first when the balance is insufficient.

3. Choose models and channels

GET/v1/models

When creating an API key on the console's API Keys page, select one or more models. For each LLM available through both channels, choose Standard or Flex; Flex is selected by default. Media models normally use Standard; GPT Image 2 is the exception and supports Standard or Flex. This endpoint returns only the models authorized for that key and still available to the account, including each model's type, format, and endpoint.

curl https://hopsapi.com/v1/models \
  -H "Authorization: Bearer sk-YOUR_KEY"

Each LLM ID is routed through that model's selected channel, and different models on the same key can use different channels. Responses-capable text models additionally include responses_endpoint; do not infer protocol support from the model ID alone.

4. Call the advertised endpoint

The following example uses a standard OpenAI Chat Completions model:

POST/v1/chat/completions

Generate a response with a model advertised in the model list as OpenAI Chat format.

curl https://hopsapi.com/v1/chat/completions \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"kimi-k3","max_tokens":256,"messages":[{"role":"user","content":"Introduce yourself in one sentence."}]}'

Next steps

  • If the model includes responses_endpoint, continue with the OpenAI Responses API.
  • Claude uses its native endpoint. Gemini uses its native endpoint by default, while models advertising openai-completions can also use Chat Completions. See Protocols & endpoints.
  • Image and video models use asynchronous tasks; choose a guide such as Grok Imagine Video or Nano Banana 2.

Always follow the metadata returned by GET /v1/models. Claude and media models cannot use this Chat Completions example directly; Gemini can use it only when supported_protocols includes openai-completions.

On this page

On this page