Making Your First Request

Learn the core anatomy of a Qorebit API request.

Base URL

All API requests should be made to the following base URL:

https://api.qorebit.ai/v1

Request Example (cURL)

Terminal
curl https://api.qorebit.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer qb_live_..." \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": "Hello! How can Qorebit help me?"
      }
    ]
  }'

The Response

Qorebit returns a standardized response compatible with the OpenAI specification.

JSON Response
{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1677652288,
  "model": "openai/gpt-4o",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Qorebit provides a single gateway to multiple AI providers. I can help you access GPT-4, Claude 3, and Gemini Pro with just one integration."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 30,
    "total_tokens": 45
  }
}

Wait, Where is the Key?

Before you can make this request, you need to create a project in the dashboard. Upon project creation, an API key is automatically generated for you.