Build a Sign in with Syntic app
⚠️
Preview — this feature is being built; the design below is the spec.
Your own application can let people sign in with their Syntic account and call Syntic models on their own plan, instead of you paying for their usage with your API key. This uses the same OAuth 2.0 authorization-code flow with PKCE that Syntic’s own apps use, described step by step on Sign in with Syntic.
When to use it
| Situation | Approach |
|---|---|
| Your users each have Syntic and should be billed on their own plan | An OAuth app |
| You sell a product and pay for model usage yourself | Your own API key on your server |
| Internal tool for your organization’s members | An OAuth app with audience: organization |
Register the app
Register with an Admin key using Register an OAuth app. Choose:
- Client type.
publicfor desktop, mobile and single-page apps (no secret can be kept safe there).confidentialfor server-side apps. - Redirect URIs. Exact matches only, no wildcards. Desktop apps may use a loopback address with any port.
- Scopes. Ask for the fewest you need.
user:profileto know who signed in;user:inferenceto call/v1on their behalf.
The flow in brief
- Send the person to
https://app.syntic.ai/oauth/authorizewith yourclient_id,redirect_uri,scope, astatevalue and a PKCEcode_challenge. - They approve. Syntic redirects back with a
code. - Exchange the code (plus the PKCE verifier, and your secret if confidential) for an access token and refresh token.
- Call
/v1withAuthorization: Bearer <access token>. Usage counts against the person’s organization and plan. - Refresh before expiry; revoke on sign-out.
What people see
The approval screen shows your app’s name and logo, the organization they are signing in to, and plain-language descriptions of the scopes. Apps with audience: any show “Reviewed by Syntic” once approved; until then only your own organization’s members can sign in.
Rules
- No scope lets an app create API keys. The access token is the credential.
- Access tokens last one hour; refresh tokens 30 days of inactivity.
- People can see and revoke every app they approved in their account settings, and owners can revoke apps organization-wide.
- Plan limits apply to the person’s organization exactly as in Syntic’s own apps, including 402 quota_exhausted.
Was this page helpful?