Skip to main content
Send an API token in the Authorization header for each job. The model catalogue is public, including GET /v1/models, HEAD /v1/models and GET /v1/models/{id}.
A job request with an invalid token gets 401 invalid_api_key. The message tells you what to fix. A valid token for a suspended account gets 403 account_suspended. All tokens on an account share its four concurrent job slots.

Make a token

  1. Sign in on sharemy.ai and open the account panel (your balance, or Account, at the top right).
  2. Under API tokens, type a name, such as “my server”. Names can be up to 40 characters.
  3. Press Create token.
  4. Copy the token. It is shown once and cannot be shown again.
An account can have up to 10 tokens. To make an 11th, revoke one first. Each token spends the credits of the account that made it. A token also signs in a headless share worker, whose earnings go to the same account.

See and revoke tokens

The API tokens list shows each token’s first characters, its name, and the day it was last used. Press Revoke next to a token to delete it. Calls with a revoked token fail with 401 at once.

Keep tokens secret

Anyone with a token can spend your credits. ShareMyAI keeps only a hash of each token, so we cannot show it to you again or recover it for you.
  • Keep tokens in environment variables or a secrets manager, not in source code.
  • Do not put a token in a web page or app that other people download. Call the API from your server instead.
  • Give each server or script its own token, so you can revoke one without stopping the others.
  • If a token may have leaked, revoke it and make a new one.

Browsers

CORS allows any origin and echoes the headers requested by a browser during preflight, including those sent by the OpenAI JavaScript SDK. Browser code can read the API response headers. Use your own token on your own machine. Keep shared app tokens on your server.