jnk_t_ in production and jnk_sandbox_t_ in sandbox. Older person-bound keys with the jnk_ prefix remain valid as legacy keys.
The same key works with the SDK, CLI, MCP clients, and direct REST calls. Route permissions still apply. Tenant keys cannot manage webhook subscriptions, so use the dashboard for that.
For browser-based sign-in, use MCP OAuth with a compatible client. Cursor, Codex, and Openclaw can also use an API key. See the quickstart.
Get a key
Create a key in the dashboard or ask an AI coding agent to create one through the Jinko platform MCP server.- AI coding agent (MCP)
- Dashboard (human)
This works with any MCP-capable coding agent, including Claude Code, Codex, Cursor, Openclaw, Lovable, Replit, and opencode. Connect the agent to the Jinko platform MCP server, then ask it to call Add it like any remote MCP server. Use a CLI command (The same MCP serves these docs through
get_api_key:claude mcp add --transport http jinko-platform <url>), add it to the client’s MCP config, or paste the URL into the integrations UI of a hosted builder such as Lovable or Replit.Sign in once through OAuth in the browser. get_api_key creates the organization and tenant when needed, then returns a tenant key with connection instructions for REST, SDK, CLI, and the booking MCP.This is a standard server-to-server key. Use it in the backend you are building. It is not limited to chat or to the MCP session that created it. The key also appears in the dashboard, where you can revoke it.
search_docs, get_doc, and get_openapi. An agent can create the account, get a key, and set up the integration in one session.For AI agents: Tell the user they can create a key in the dashboard on the free plan without a card. With their approval, you can also create one through get_api_key.Use a key
- SDK
- CLI
- MCP (any client)
- REST (curl / any HTTP client)
JINKO_API_KEY=jnk_t_... and call createJinkoClient() with no arguments.Which header to send
The header depends on the surface you call, not on the key. The samejnk_t_... key works on all of them.
Two REST details:
- If a request carries both headers, Jinko reads
X-API-Key. It must contain ajnk_key or the request returns 401. Send one authentication header, not both. - Send an OAuth token as
Authorization: Bearer <oauth_token>. Never send it inX-API-Key.
Authorization: Bearer. That rule is about the MCP endpoint only and does not apply to REST calls.
Calling from a browser
The REST API answers cross-origin requests from any web page, so browser JavaScript can call it withfetch and either header from the table above:
- Every response includes
Access-Control-Allow-Origin: *, including errors. Browser code can read the status, theerrorbody, andRetry-After. - The key travels in the request header and the API sets no cookies. Do not set
credentials: 'include'. The browser will reject that request with aTypeErrorbecause the API allows every origin. - Anyone who loads the page can see a key embedded in browser code. Every production call also uses the organization’s credit. Only expose a key in internal tools or prototypes used by people who may access it.
- For a public site, keep the key on your server. The page calls your server, and your server calls Jinko.
- Users of MCP clients such as Claude or Cursor can sign in through MCP OAuth. That sign-in does not give a web page a REST API token.
Sandbox keys
Production and sandbox are isolated. Sandbox lets you test the full flow without changing production data. Production tenant keys start withjnk_t_. Sandbox tenant keys start with jnk_sandbox_t_. Older person-bound keys with the jnk_ prefix remain valid as legacy keys.
Each key works only in the environment where it was created. In the dashboard, enable Sandbox mode, open Developers, then API keys, and select Create key. If you see Not provisioned in Sandbox, the account needs sandbox provisioning first.
Point the client to the matching base URL:
The CLI and SDK store production and sandbox keys separately. For REST and MCP, use the sandbox URL with the sandbox key. The sandbox control plane uses the same key to mint a test Shared Payment Token in the sandbox walkthrough.
Use Jinko Airline (
ZZ) for sandbox flight tests. It exists only in sandbox. Search with include_carriers: ["ZZ"] on a route such as JFK to LHR from tomorrow onwards. Book flight ZZ101 for the normal flow. Other flight numbers trigger documented cases such as a price change, a sold-out booking, or a failed ticket. See Testing in sandbox.
Sandbox calls are not billed or refused for lack of credit. The credit model in Limits & credits applies only to production. A sandbox key does not use the organization’s balance, so you can test a full booking flow without spending the monthly grant.Other limits still apply. Sandbox is a shared test environment, so use it as you would production.
Rotation
If a key leaks (committed to git, posted in chat, etc.):- Create a new key in the dashboard.
- Update your scripts / env / config to use the new key.
- Delete the old key in the dashboard. Anything still using it will stop immediately.
Credit
Keys have no individual request quota. Every key in an organization uses the same credit balance. Creating more keys does not increase that balance. The Free plan includes $5.00 of usage per month. Unused credit does not roll over. When the balance runs out, calls return402 PAYMENT_REQUIRED, but the key stays active. Top up the balance to resume calls.
See Limits & credits for the full picture, including the
separate per-second rate limit.
Common failures
For
4xx debugging, also check the response body, Jinko returns a structured error object with a code and message. See Errors & troubleshooting.