API reference / Endpoint overview

API reference

Endpoint overview

Every endpoint goodapi supports, and which models each API format can call.

Updated

goodapi offers two API formats: OpenAI and Anthropic. Request bodies, response bodies and streaming formats match the official APIs, so existing SDKs and clients work once you change the Base URL.

Endpoints

Method Path Format Docs
POST /v1/chat/completions OpenAI Chat Completions Chat Completions
POST /v1/responses OpenAI Responses Responses
POST /v1/messages Anthropic Messages Messages
GET /v1/models OpenAI Lists the models this key can use; see below

The full URL is https://api.goodapi.tech followed by the path. Set the OpenAI SDK's Base URL to https://api.goodapi.tech/v1 and the Anthropic SDK's to https://api.goodapi.tech.

There are also a few endpoints for checking balance and request history with your key; see Balance and usage.

Which models use which format

Models Available endpoints
Claude models /v1/messages, /v1/chat/completions
GPT models /v1/responses, /v1/chat/completions
Other models /v1/chat/completions

To see exactly which formats a model supports, check the paths listed under each model in Models and pricing, or supported_endpoint_types in the /v1/models response.

Streaming

All three chat endpoints support streaming: add "stream": true to the request body and the response becomes SSE (text/event-stream), with the same event format as the corresponding official API.

Listing available models

GET /v1/models lists only the models the current key can call (the models in the key's group, or only the listed ones if model limits are enabled). Each model includes supported_endpoint_types:

bash
curl https://api.goodapi.tech/v1/models \
  -H "Authorization: Bearer $GOODAPI_API_KEY"
json
{
  "data": [
    {
      "id": "claude-sonnet-5-5",
      "object": "model",
      "owned_by": "claude",
      "supported_endpoint_types": ["anthropic", "openai"]
    }
  ],
  "object": "list",
  "success": true
}

In supported_endpoint_types, openai means /v1/chat/completions, openai-response means /v1/responses, and anthropic means /v1/messages.

Request ID

Every response carries an x-oneapi-request-id header, and error messages end with (request id: ...). Include this request ID when you contact support.