new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI Asset Pipeline · all subjects

image-gen/error-handling

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

API errors are HTTP 200 with non-2xx code field

The apimart API returns HTTP 200 status even for logical errors (e.g., insufficient balance, invalid key). Errors are indicated by a non-2xx code field in the JSON response. The client raises NanoBananaError exceptions for these cases.

API key error handling and balance checking

401 error indicates the API key is wrong or not formatted as Bearer token; check ~/.config/apimart/api_key. If insufficient balance error occurs, top up at https://apimart.ai/keys. There are no balance, history, or keys endpoints; those return informational notes for API parity only. Check actual spend at https://apimart.ai/keys.

Task timeouts and failure handling

If a task fails or is cancelled, the client raises an exception with the API error message and the generation should be re-rolled. If a task times out, set a higher timeout value when creating NanoBananaClient(timeout=…) or retry the request. The default timeout is 240 seconds.

Rembg installation for fallback background removal

If rembg is used as a fallback for background removal and the error 'rembg not installed' occurs, install it with: pip3 install rembg onnxruntime. Note that rembg should only be used as a fallback when chroma-key stripping fails.

Give your agent this brain