Who this page is for
Start here if you want to connect an application, script, AI coding tool, or OpenAI-compatible client to Skypool Token. After reading this guide, you should be able to create a Consumer API Key and complete your first model call through the unified OpenAI-compatible API.
The caller-side flow for Skypool Token is simple:
- Use one unified
baseURL - Use a Consumer API Key as the Bearer Token
- Select a platform model with the request body's
modelfield - Use the OpenAI-compatible
/v1/chat/completionsendpoint for regular chat, streaming output, tool calls, and multimodal input - Review usage, status, failure reasons, and billing records in the console
API entry point
For production, set your OpenAI-compatible client's baseURL to:
https://a.skypool.xyz/v1The full chat endpoint is:
https://a.skypool.xyz/v1/chat/completionsAll OpenAI-compatible requests should carry the key in the request headers:
Authorization: Bearer <consumer_api_key>Do not put the API Key in URLs, logs, public frontend code, or configuration files that users can download.
Step 1: Create a Consumer API Key
Log in to the Skypool Token console, open the Consumer-side API Key page, and click Create API Key. After creation succeeds, the page displays the full key. Consumer keys usually start with stc-.
We recommend splitting keys by application or environment, for example:
| Scenario | Recommendation |
|---|---|
| Local development | Create a separate development key so it is easy to debug and delete at any time |
| Production service | Use a production key that is deployed only on the server side |
| AI coding tools | Create a separate key for each tool or team to make abnormal requests easier to troubleshoot |
| Temporary testing | Delete the key after testing to avoid leaving long-lived credentials behind |
Step 2: Choose a model
View currently available models on the Models page or in the usage examples in the console.
You can also read the model list through the OpenAI-compatible API:
https://a.skypool.xyz/v1/modelsContext length, pricing, tool-calling support, and multimodal capabilities may vary by model. Before connecting a production application, we recommend confirming the target model's response structure, latency, and failure semantics in the console or with a test script.
Step 3: Make your first request
The following is a minimal non-streaming request. Replace <consumer_api_key> with your Consumer API Key, and change model to the model you want to use.
For an even simpler test path, you can try it directly in Skypool Playground.
curl -X POST "https://a.skypool.xyz/v1/chat/completions" \ -H "Authorization: Bearer <consumer_api_key>" \ -H "Content-Type: application/json" \ --data-raw '{ "model": "gemma4:26b", "messages": [ { "role": "user", "content": "Hello, introduce Skypool Token in one sentence." } ], "max_tokens": 128, "stream": false }'If the response contains choices[0].message.content, your key, endpoint, and model are working.
Step 4: Enable streaming output
For interactive scenarios such as chat, agents, and AI coding tools, streaming output is recommended. Use stream: true for streaming requests, and include stream_options.include_usage: true so the final frame can return real usage.
curl -N -X POST "https://a.skypool.xyz/v1/chat/completions" \ -H "Authorization: Bearer <consumer_api_key>" \ -H "Content-Type: application/json" \ --data-raw '{ "model": "gemma4:26b", "messages": [ { "role": "user", "content": "Give me a minimal TypeScript HTTP client example." } ], "max_tokens": 512, "stream": true, "stream_options": { "include_usage": true } }'Streaming responses follow the OpenAI-compatible SSE format: each event starts with data:, and a normal completion returns data: [DONE]. Clients should handle incremental delta.content, tool-call deltas, the final usage frame, and mid-stream error events.
Use the OpenAI SDK
Any OpenAI SDK or compatible client that supports a custom baseURL can connect directly to Skypool Token.
The example below supports switching between TypeScript and Python in the same code block and copying the code for the current language:
import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.SKYPOOL_API_KEY, baseURL: "https://a.skypool.xyz/v1",}); const completion = await client.chat.completions.create({ model: "gemma4:26b", messages: [ { role: "user", content: "Explain the benefit of an OpenAI-compatible API in one sentence.", }, ], max_tokens: 128,}); console.log(completion.choices[0]?.message?.content);Connect AI coding tools
AI coding tools usually need only three pieces of information:
| Configuration item | Value |
|---|---|
| API Key | Consumer API Key, for example stc-... |
| Base URL | https://a.skypool.xyz/v1 |
| Chat Completions URL | https://a.skypool.xyz/v1/chat/completions |
| Model | Platform model name, for example gemma4:26b |
Different tools use slightly different names for endpoint fields. Some tools ask for a baseURL, while others ask for the full chat completions address. Check the tool's field descriptions before configuring it:
- If the field is named
baseURL,Base URL, orOpenAI API Base, enterhttps://a.skypool.xyz/v1 - If the field is named
endpoint,API Endpoint, orAPI URL, and the example includes/chat/completions, enterhttps://a.skypool.xyz/v1/chat/completions
For common tool integrations, see:
- WorkBuddy integration
- OpenCode integration
- Cline integration
- Dify integration
- LiteLLM integration
- Vercel AI SDK integration
Request parameter recommendations
| Parameter | Recommendation |
|---|---|
model | Use a model ID from the platform Models page or the /v1/models response |
messages | Follow the OpenAI-compatible message structure, and use the tool role for tool results |
stream | Set to true for chat, agent, and long-output scenarios |
stream_options.include_usage | Set to true for streaming requests so usage and billing are easier to verify |
max_tokens | Set an explicit output limit to avoid uncontrolled usage on long tasks |
temperature | For production tasks, start with a lower value and tune it for your business case |
tools | Use the OpenAI-compatible tools structure when function calling is needed |
Review activity records
After a request completes, return to the Activity page in the Consumer console. You can review request time, model, status, Token usage, failure reason, and billing information there.
If you are debugging a third-party tool, first use curl or Skypool Playground to verify the same key and model, then migrate the same parameters into the tool configuration. This helps you quickly tell whether the issue is on the platform call path or in the tool-side configuration.
Common errors
| Symptom | Check first |
|---|---|
401 or authentication failure | Whether the API Key was copied completely, and whether the request uses the Authorization: Bearer header |
402 or insufficient balance | Whether the account has enough credits |
404 or model not found | Whether model comes from the current platform model list |
429 or rate limiting | Whether concurrency is too high, and whether you need to lower concurrency or split requests across keys |
5xx or node unavailable | Retry later, and check the failure semantics in activity records |
| Tool keeps waiting | Whether the streaming client correctly handles data: [DONE] and error events |
Minimum onboarding checklist
- Log in to the console and create a Consumer API Key
- Choose a model ID from the Models page or
/v1/models - Set your OpenAI-compatible client's
baseURLtohttps://a.skypool.xyz/v1 - Carry the API Key as a Bearer Token
- Verify the basic call with a non-streaming
curlrequest first - Then enable streaming output and tool calls
- Check status, usage, and failure reasons in activity records