Skip to main content

Frequently Asked Questions

Authentication & Access

How do I get API credentials?

Go to Service Accounts in the neuroflash app and create a new service account. You'll receive a client_id and client_secret. See Authentication for the full setup guide.

How long do access tokens last?

Access tokens are valid for approximately 4 hours (14,399 seconds). When your token expires, the API returns a 401 Unauthorized response. Request a new token using the same client credentials flow.

You should cache your token and reuse it until it expires — there is no need to request a new token for every API call.

Can I use the API from client-side/browser code?

No. Your client_secret must be kept confidential and should never be exposed in client-side code, mobile apps, or browser JavaScript. Always call the neuroflash API from a backend server.

Workspaces & Quotas

How do I find my workspace ID?

Call the List Workspaces endpoint:

GET https://app.neuroflash.com/api/workspace-service/v1/workspaces

The response includes all workspaces your service account has access to. Use the id field from the workspace you want to work with. See the Quickstart for a full example.

What's the difference between daily and monthly limits?

Your workspace has both a monthly limit (limitAmount) and a daily limit (limitAmountDaily). The daily limit prevents excessive usage in a single day, while the monthly limit caps total usage for the billing cycle. Both must have remaining capacity for a request to succeed.

Check your current usage with the Quotas endpoint.

What happens when my quota resets?

Monthly quotas reset at the start of each billing cycle. Daily quotas (usedAmountDaily) reset every day. The dailyRefreshed field in the quota response shows the date of the last daily reset.

What does fairUseLimitReached mean?

When fairUseLimitReached is true, your workspace has hit the fair use policy threshold. This is separate from your regular quota limits and is designed to prevent abuse. The API returns a 403 Forbidden response until the limit resets. If you believe this is an error, contact support.

Content Generation

Which AI models are available?

The available models depend on your workspace's subscription plan. Call the Models endpoint to list the models you have access to. Models from providers like OpenAI (GPT), Anthropic (Claude), Google (Gemini), and Mistral may be available.

How does word usage tracking work?

Each content generation request consumes words from your workspace's quota. The number of words consumed depends on the length of the generated content. Check your remaining word balance using the Quotas endpoint.

Can I stream responses?

The Chat Completions endpoint supports streaming via server-sent events. Set "stream": true in your request body to receive incremental responses as they are generated.

General

What format are request and response bodies?

All request and response bodies use JSON. Set the Content-Type: application/json header on requests that include a body. Responses always return JSON with Content-Type: application/json.

How do I report an issue or get support?
  • For API documentation issues, open an issue on the documentation repository
  • For API bugs or account issues, contact neuroflash support through the app
  • When reporting issues, include the x-request-id header from the API response — see Debugging for details