Skip to main content

Before you start

You need an AIOHub account with a positive balance. For the first test, use the OpenAI-compatible API, then switch formats when a client requires Claude Messages, Responses, or Gemini API endpoints.

First request in four steps

1

Open the console

Sign in to the AIOHub Console. Confirm that your account has a positive balance in wallet management. If you need to add funds, see Add funds.
2

Create an API key

Open API key management and create an API key that starts with sk-. Use one API key per tool when you want separate limits and usage logs.
API keys are secrets. Do not share them or commit them to source control.
3

Verify available models

Request the model list first. This confirms that your API key, balance, and group access are valid.
curl https://api.aiohub.org/v1/models \
  -H "Authorization: Bearer sk-your-api-key"
A successful response returns the models visible to the groups assigned to the current API key.
4

Send a chat request

Send your first basic chat request with the OpenAI-compatible API.
curl https://api.aiohub.org/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Choose an API format

Use caseBase URLEndpoint
OpenAI SDK / general toolshttps://api.aiohub.org/v1POST /chat/completions
Codex CLIhttps://api.aiohub.org/v1POST /responses
Anthropic SDK / Claude Codehttps://api.aiohub.orgPOST /v1/messages
Gemini CLIhttps://api.aiohub.orgPOST /v1beta/models/{model}:generateContent
Gemini REST / Google SDKhttps://api.aiohub.org/v1betaPOST /models/{model}:generateContent
If you are unsure which format a client needs, start with the matching client guide. If you are writing API code directly, start with OpenAI Chat Completions.

Next steps

Choose a client

Configure Claude Code, Codex CLI, Gemini CLI, OpenAI-compatible apps, or chat clients.

Understand groups

Confirm that the groups assigned to your API key can access the target model.

Read the API overview

Compare formats, auth headers, and supported endpoint families.

Troubleshoot errors

Fix authentication failures, insufficient balance, network issues, and model availability errors.