{"openapi":"3.1.0","info":{"title":"Genus API","version":"1","description":"Species identification from a photo. Plants: up to 20 ranked matches from 60,902 species worldwide, as iNaturalist taxon IDs with probabilities. 500 free calls once per account, then 1 prepaid credit per call. Credits cost $5 per 1,000, down to $1 per 1,000 in larger credit packs. Prices as of November 2026."},"servers":[{"url":"https://api.genusapi.com"}],"components":{"securitySchemes":{"key":{"type":"http","scheme":"bearer","description":"An API key (genus_...) from https://genusapi.com/dashboard"}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"A code to branch on"},"message":{"type":"string","description":"What to do about it"}}}}},"security":[{"key":[]}],"paths":{"/v1/plants/identify":{"post":{"summary":"Identify the plant in a photo","parameters":[{"name":"lat","in":"query","schema":{"type":"number","minimum":-90,"maximum":90},"description":"Where the photo was taken, decimal degrees. Send with lon; plants recorded nearby rank higher."},{"name":"lon","in":"query","schema":{"type":"number","minimum":-180,"maximum":180},"description":"Send with lat."},{"name":"top","in":"query","schema":{"type":"integer","minimum":1,"maximum":20,"default":5},"description":"How many matches to return."}],"requestBody":{"required":true,"description":"The photo itself, at most 6 MB. 512 px on the shorter side is plenty.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The matches, most likely first","content":{"application/json":{"schema":{"type":"object","required":["request_id","model","location_used","results","credits_charged","credits_left","free_calls_left","ms"],"properties":{"request_id":{"type":"string","format":"uuid"},"model":{"type":"string","description":"The model that answered"},"location_used":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","required":["taxon_id","name","score"],"properties":{"taxon_id":{"type":"integer","description":"The iNaturalist taxon ID"},"name":{"type":"string","description":"Scientific name"},"score":{"type":"number","description":"Probability, 0 to 1"}}}},"credits_charged":{"type":"integer","enum":[0,1],"description":"Credits this call took: 0 for a free call, 1 for a paid one"},"credits_left":{"type":"integer","description":"The account's credits after this call"},"free_calls_left":{"type":"integer","description":"Free calls left on the account"},"ms":{"type":"number","description":"Time spent identifying"}}}}}},"400":{"description":"bad_location, bad_top or bad_photo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"no_credit (the free calls are used and there are no credits left) or key_limit (the key reached its daily credit limit)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found: no such endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"photo_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_photo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal; not charged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"busy: still waiting for capacity after 45 seconds; not charged, send it again after the seconds in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}