APIQIKAPIQIK
Docs
Api

Anthropic and Gemini APIs

Use the Anthropic Messages and Gemini generateContent-compatible entry points.

APIQIK registers Anthropic and Gemini-compatible entry points. Each protocol keeps its own request and response shape. Do not apply OpenAI messages or choices fields directly to either protocol.

Anthropic Messages

POST /v1/messages

Use x-api-key for authentication when possible; Authorization: Bearer <API_KEY> is also supported. Requests use application/json, and streaming requests return Anthropic event types.

Common request fields include model, messages, max_tokens, system, temperature, stream, tools, and tool_choice. Unsupported fields return a parameter error. OpenAI and Anthropic tool or reasoning parameters are not interchangeable by default.

{
  "model": "<model-id>",
  "max_tokens": 512,
  "messages": [
    {
      "role": "user",
      "content": "Describe APIQIK in one sentence."
    }
  ]
}

Request the model list with GET /v1/models and include the anthropic-version header to select the Anthropic model-list response format.

Gemini generateContent

The following paths are registered:

  • POST /v1/models/{model}:generateContent
  • POST /v1/models/{model}:streamGenerateContent
  • POST /v1beta/models/{model}:generateContent
  • POST /v1beta/models/{model}:streamGenerateContent
  • POST /v1beta/interactions

The model list is GET /v1beta/models. Authentication supports x-goog-api-key, the key query parameter, or Bearer authentication.

Pass {model} as a path parameter. Request and response bodies use native Gemini fields such as contents, parts, and candidates. Streaming paths return Gemini streaming data and must not be parsed as OpenAI SSE choices[].delta chunks.

{
  "contents": [
    {
      "role": "user",
      "parts": [
        {"text": "Describe APIQIK in one sentence."}
      ]
    }
  ]
}

Compatibility boundary

  • Anthropic and Gemini requests share model routing, usage recording, and error mapping, but protocol fields are not converted into a common OpenAI response.
  • Provider capabilities, model identifiers, and advanced parameters follow the current model catalog and adapter support.
  • When using an official SDK, set its Base URL to the corresponding protocol deployment and use the APIQIK key. Do not also send the provider's original API key.